@nx-devkit/oxlint
v0.1.18
Published
Standalone Nx plugin: infers a cached lint target from .oxlintrc config files — no project.json required.
Maintainers
Readme
@nx-devkit/oxlint
Standalone Nx plugin: any .oxlintrc.* config becomes a project with a cached lint target. A workspace-root .oxlintrc.json also backstops every packages/* directory containing a package.json that lacks its own config. No project.json needed.
Part of nx-devkit. If you want the full TypeScript toolchain (typecheck, test, lint, format, build), use the @nx-devkit/typescript preset instead — it includes everything this plugin does.
Install
bun add -D @nx-devkit/oxlint oxlintDepends on @nx/devkit ^22 || ^23 (installed automatically — nx itself comes from your workspace via devkit's peer range). Requires the oxlint ^1 peer.
Register
nx add @nx-devkit/oxlint # runs the init generator — registers the plugin in nx.jsonOr manually:
// nx.json
{ "plugins": ["@nx-devkit/oxlint"] }What it infers
| Trigger | Target | Command | Cacheable | Inputs |
|---|---|---|---|---|
| .oxlintrc.{json,yml,yaml,cjs,mjs,js,cts,mts} | lint | oxlint . (via nx:run-commands, cwd = project root) | yes | src/**, .oxlintrc.*, package.json |
Config files are read defensively: the plugin only checks the file exists and is within the size limit — JSON parse failures are tolerated, and non-JSON formats (yaml/js) are never parsed by the plugin. Real config semantics are delegated to oxlint at target runtime.
Inspect
npx nx show projects
npx nx show project <name>
npx nx run <name>:lintSkip rules
- Configs inside
node_modulesare skipped. - Configs that escape the workspace root are skipped.
- The workspace-root
.oxlintrc.*never becomes a project itself — but a readable.oxlintrc.jsonthere enables a fallbacklinttarget on everypackages/*directory containing apackage.jsonthat lacks its own.oxlintrc.*. - Unreadable files and configs larger than 1 MiB are skipped.
Options
None. Behavior is entirely file-driven.
License
MIT
