Files
overlookmotel d5d3c76cf6 test(linter/plugins): skip ESLint Stylistic conformance test with invalid syntax (#26082)
#26076 updated Oxlint JS plugin conformance snapshots, revealing that one ESLint Stylistic test was failing.

Turns out the cause was #25154 which (correctly) made it illegal for a `TSIndexSignature` to contain more than one parameter. The code in this test case is invalid. So just skip the test.
2026-08-25 14:13:28 +00:00
..
…

Oxlint JS plugins conformance tests

Conformance tests run:

  • All ESLint's tests for its built-in rules as Oxlint JS plugins.
  • Tests from various ESLint plugins, running in Oxlint.

They do this by substituting ESLint's RuleTester for Oxlint's version, and then require()ing the test files to run the tests.

The results are saved in snapshots directory.

Setup

Build Oxlint in conformance mode:

cd apps/oxlint
pnpm install
pnpm run build-conformance

Initialize plugin submodules:

pnpm run init-conformance

Run conformance tests

pnpm run conformance

Updating a pinned repo version

All upstream repo URLs, commit SHAs, and version labels are stored in repos.json. Both init.sh and the TypeScript test groups read from this single file.

To update a repo to a newer version:

  1. Edit repos.json — update the commitSha and version for the repo.
  2. Re-initialize submodules: pnpm run init-conformance
  3. Re-run the conformance tests: pnpm run conformance
  4. Commit the updated repos.json and snapshot files.

Adding a plugin to conformance tests

  • Add an entry to repos.json with the repo's URL, commit SHA, and version.
  • Add code to init.sh to clone and set up the plugin's repo.
  • Add a file to src/groups directory (copy pattern used for other plugins).
  • Add the group to src/groups/index.ts.

Debugging

While working on adding a new plugin, you may find it useful to filter the test run, by editing conformance/src/filter.ts. You can filter by plugin name, rule, or the code of a specific test case.