Contributing
Build from source
Needs Node ≥ 24 and Rust 1.96 (pinned by rust-toolchain.toml; rustup
picks it up).
npm run build:native (scripts/build-native.mjs):
- builds the release binary, the shared
liblintrsand theliblintrs.nodewrapper (the shared half intarget/native, with-C prefer-dynamic); - fixes install names and rpaths (
@rpath+@loader_pathon macOS,$ORIGINon Linux) and copies the shared libstd; - stages:
A binary built from the checkout finds the host modules in host/. sdk/ is staged for development only; releases ship it as the
separate lintrs-sdk-* tarball.
Build a relocatable distribution (dist/lintrs-<version>-<target>/ and its
.tar.gz):
Tests
Host fixtures compare unchanged rules against ESLint: messages, fixes,
suggestions, suppressions and UTF-16 locations. Guards keep ESLint's lint
engine and the JS TypeScript checker out of the native host. The lintrs_
tests in vendor/tsrs_api cover the query, symbol-index and
checker-lifecycle extensions.
The vendored tsrs_api
vendor/tsrs_api is tsrs's tsrs_api crate with lintrs' extensions, which
need its crate-private checker internals. The other tsrs crates are ordinary
git dependencies. Its README covers what changed and how to update tsrs; the
code keeps upstream's formatting, so cargo fmt skips it.
Native binding tests run in two mutually exclusive modes:
Running the tests from an AI coding agent? oxlint changes its own output
when it detects one (CLAUDECODE, AI_AGENT and similar), which can hide
failures CI sees. Clear those variables to test as CI and users run lintrs:
Docs
The site uses Rspress with its own docs/package.json.
Add pages under docs/docs/ and list them in rspress.config.ts.
