Commit 58d31f8
Migrate from ESLint to Oxlint for faster linting (#653)
* Migrate ESLint to Oxlint with @nkzw/oxlint-config
Replace ESLint 8 + @typescript-eslint with oxlint + oxlint-tsgolint for
type-aware linting. Uses @nkzw/oxlint-config as the shared base config with
conservative rule overrides to preserve the original lint surface (no new
violations requiring codebase changes).
- Add: oxlint, oxlint-tsgolint, @nkzw/oxlint-config and required JS plugins
- Remove: eslint, @typescript-eslint/eslint-plugin, @typescript-eslint/parser,
eslint-config-prettier
- Create oxlint.config.ts with calibrated overrides that disable @nkzw rules
beyond the original ESLint scope (perfectionist sorting, unicorn stylistic
rules, react-hooks-js extras, etc.)
- Disable unused-imports/no-unused-imports due to @typescript-eslint compat
crash in oxlint's JS plugin runner on TSMappedType
- Update package.json lint scripts: eslint → oxlint --type-aware
- Update .lintstagedrc.json: eslint --fix → oxlint --fix
- Update CI workflow job name
- Delete .eslintrc.js and .eslintignore
https://claude.ai/code/session_01JZoXnsCz9YCM7SyHxfqPEH
* Simplify oxlint config: drop @nkzw/oxlint-config and all JS plugins
Use oxlint + oxlint-tsgolint with standard defaults only. No third-party
plugin layer needed — oxlint's built-in rules cover the correctness and
TypeScript-aware checks we care about.
- Remove: @nkzw/oxlint-config, @nkzw/eslint-plugin,
eslint-plugin-no-only-tests, eslint-plugin-perfectionist,
eslint-plugin-react-hooks, eslint-plugin-unused-imports
- Simplify oxlint.config.ts to just ignorePatterns + typescript plugin +
the three custom rules from original ESLint (no-console, no-var-requires
off, unbound-method off)
Result: pnpm lint exits 0 (194 warnings from tsgolint type-aware defaults,
0 errors)
https://claude.ai/code/session_01JZoXnsCz9YCM7SyHxfqPEH
* Add --max-warnings 0; fix/suppress all warnings for clean lint
- Remove dead overrides (no-var-requires, unbound-method had 0 violations)
- Disable no-redundant-type-constituents and no-duplicate-type-constituents:
systematic false positives from neo4j-driver types using `any` internally,
causing cascading type issues in unions across ~40 files
- Add --max-warnings 0 to lint script for strict mode going forward
- Fix no-unused-vars: 15 catch bindings → `catch { }` (unused params)
- Fix no-unused-expressions: convert ternary-as-statement to if/else,
fix comma-assignment syntax, add missing `return`, remove stray `1;`
- Add file-level oxlint-disable for no-misused-spread in test file
(intentional plain-object spreads of class instances for comparison)
- Fix require-array-sort-compare: .sort() → .sort((a, b) => a.localeCompare(b))
- Add inline disable for restrict-template-expressions and
no-meaningless-void-operator (type-cascade false positive / preserve behavior)
Result: pnpm lint exits 0 with 0 warnings and 0 errors
https://claude.ai/code/session_01JZoXnsCz9YCM7SyHxfqPEH
* Move no-misused-spread to config-level off, remove file disable comment
https://claude.ai/code/session_01JZoXnsCz9YCM7SyHxfqPEH
* Restore unbound-method: off for Playwright mount fixture false positives
The `mount` parameter in Playwright e2e tests is a test fixture destructured
from the test context, not a class method — oxlint incorrectly flags it as an
unbound method reference. This restores the suppression that was mistakenly
removed in the previous commit.
https://claude.ai/code/session_01JZoXnsCz9YCM7SyHxfqPEH
* Replace vscode-eslint recommendation with oxc-vscode; clean up tsconfig.node
- Swap dbaeumer.vscode-eslint for oxc.oxc-vscode in .vscode/extensions.json
- Remove .eslintrc.js from tsconfig.node.json include (file no longer exists)
https://claude.ai/code/session_01JZoXnsCz9YCM7SyHxfqPEH
* Remove unnecessary playwright/index.tsx from oxlint ignorePatterns
The file produces no lint violations so it does not need to be ignored.
https://claude.ai/code/session_01JZoXnsCz9YCM7SyHxfqPEH
* Remove unnecessary ignore for simple-match.js; fix no-unused-vars
Prefix unused fixture variables with _ instead of suppressing the file
in oxlint ignorePatterns.
https://claude.ai/code/session_01JZoXnsCz9YCM7SyHxfqPEH
* Restore original variable names in simple-match.js, suppress lint via comment
Use /* eslint-disable no-unused-vars */ (matching the pattern in simple-match.ts)
to avoid invalidating variable names that are part of the textmate snapshot.
https://claude.ai/code/session_01JZoXnsCz9YCM7SyHxfqPEH
* Revert simple-match.js to original, add textmate fixtures to oxlint ignore
The textmate fixture files are test data for snapshot-based syntax
highlighting tests. They intentionally contain unused variables and
other patterns that trigger lint rules. Ignoring the entire fixtures
directory is more robust than suppressing individual rules per file.
https://claude.ai/code/session_01JZoXnsCz9YCM7SyHxfqPEH
* Match lint-staged flags to pnpm lint: --type-aware, --max-warnings 0, *.js
Align the pre-commit hook with the full lint script by adding --type-aware
and --max-warnings 0 to the oxlint call, and extending coverage to *.js
files so the same rules apply on commit as in CI.
https://claude.ai/code/session_01JZoXnsCz9YCM7SyHxfqPEH
* Fix oxfmt formatting in oxlint.config.ts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 330688c commit 58d31f8
28 files changed
Lines changed: 354 additions & 318 deletions
File tree
- .github/workflows
- .vscode
- packages
- language-server/src
- language-support/src
- autocompletion
- syntaxValidation
- lint-worker/src
- query-tools/src
- data-transforms
- react-codemirror/src
- e2e_tests
- lang-cypher
- vscode-extension
- src
- webviews/queryResults
- tests
- mocks
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | 34 | | |
37 | 35 | | |
38 | 36 | | |
39 | | - | |
40 | | - | |
41 | 37 | | |
42 | 38 | | |
43 | 39 | | |
| 40 | + | |
| 41 | + | |
44 | 42 | | |
45 | 43 | | |
46 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
| 248 | + | |
248 | 249 | | |
249 | 250 | | |
250 | 251 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
396 | | - | |
| 396 | + | |
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
| |||
490 | 490 | | |
491 | 491 | | |
492 | 492 | | |
493 | | - | |
| 493 | + | |
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| |||
0 commit comments