What problem does this feature solve?
I run an LLM coding agent (Node/TS) that generates code and lints file changes before before storing them in the databse. The point is to catch the dumb render-breaking stuff inside the generation loop especially conditional hooks or const reassignment
Afaik today rslint only supports linting real files on disk
Current linters with in-memory:
- eslint:
lintText(code, { filePath }), works
- biome: in-process Node API,
lintContent(projectKey, content, { filePath }), works
- oxlint: disk only
- rslint: disk only
We are using Biome for this because it's the only fast linter with a real in-process Node API right now but I would rather be on rslint to not mix both stacks
What does the proposed API of configuration look like?
Maybe mirror Biome's shape somehow like this (or even better to support ts-go or other cross file lintings)
import { Rslint } from "@rslint/core";
const rslint = new Rslint();
const { projectKey } = rslint.openProject("/");
rslint.applyConfiguration(projectKey, config);
const { diagnostics } = rslint.lintContent(projectKey, source, {
filePath: "virtual/Component.tsx", // virtual, never written to disk
});
here's my current Biome setup:
import { Biome, type Configuration } from "@biomejs/js-api/nodejs";
const biome = new Biome();
const { projectKey } = biome.openProject("/");
biome.applyConfiguration(projectKey, config);
const { diagnostics } = biome.lintContent(projectKey, content, { filePath });
// map diagnostics -> { path, line, column, rule, severity, message }
What problem does this feature solve?
I run an LLM coding agent (Node/TS) that generates code and lints file changes before before storing them in the databse. The point is to catch the dumb render-breaking stuff inside the generation loop especially conditional hooks or const reassignment
Afaik today rslint only supports linting real files on disk
Current linters with in-memory:
lintText(code, { filePath }), workslintContent(projectKey, content, { filePath }), worksWe are using Biome for this because it's the only fast linter with a real in-process Node API right now but I would rather be on rslint to not mix both stacks
What does the proposed API of configuration look like?
Maybe mirror Biome's shape somehow like this (or even better to support ts-go or other cross file lintings)
here's my current Biome setup: