Skip to content

Linter

Contributing New Rules

See the adding rules guide for how to add new rules to Oxlint.

Development

Create a ./test.ts and then

bash
just watch "cargo run --bin oxlint -- test.ts"
``````bash
just watch "cargo test -p oxc_linter -- rule-name"
``````bash
# build the oxlint cli in the oxc repo
just oxlint-node
# and then in the directory of the codebase you want to test with, run oxlint with node:
node <path-to-oxc-repo>/apps/oxlint/dist/cli.js
# You can also pass flags to it, like -D to enable a specific rule, and --disable-x-plugin to turn off default plugins:
node <path-to-oxc-repo>/apps/oxlint/dist/cli.js -D rulename --disable-unicorn-plugin --disable-oxc-plugin --disable-typescript-plugin