Linting with Oxlint¶
This starter kit uses Oxlint for JavaScript and TypeScript linting. The root .oxlintrc.json applies one rule set throughout the pnpm workspace.
Run the linter¶
Apply safe automatic fixes with:
pnpm check runs the linter and the Oxfmt formatting check together.
Configuration¶
The root config treats correctness diagnostics as errors and enables Oxlint's native plugins for the technologies used by the repository:
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": [
"eslint",
"typescript",
"unicorn",
"oxc",
"import",
"react",
"jsx-a11y",
"vitest",
"node"
],
"categories": {
"correctness": "error"
},
"rules": {
"react/react-in-jsx-scope": "off",
"vitest/no-standalone-expect": "off",
"vitest/require-mock-type-parameters": "off",
"vitest/require-to-throw-message": "off"
}
}
The React rule is disabled because this project uses the automatic JSX runtime. Three Vitest rules are disabled because they reject valid hooks, untyped mock inference, and intentional error-only assertions already used by the tests. The plugins are built into Oxlint, so they do not require separate npm packages.
Generated routes, generated documentation, and agent tooling are ignored. Keep lasting workspace policy in the root config instead of adding package-local files.
Fix a diagnostic¶
- Read the rule name and explanation.
- Fix the code when the rule identifies a real issue.
- Run
pnpm lint:fixfor safe mechanical fixes. - Run
pnpm checkagain.
Do not disable a rule only to make the command green. If a rule conflicts with the repository's runtime or generated code, add the narrowest root override and record the reason.
To check one path while iterating, run: