Repository navigation
Prepare independent rules for ESLint removal - #8725
gonzaloriestra wants to merge 16 commits into
Conversation
e8e0270 to
7d15735
Compare
bd59b32 to
d7f720e
Compare
7245616 to
c1da7db
Compare
59e6dfd to
6d59561
Compare
22b3807 to
ab2f5d3
Compare
isaacroldan
left a comment
There was a problem hiding this comment.
Found an autofix issue to address before this rule is enabled.
🤖 Generated by the review-pr skill
| node: node.property, | ||
| message: 'Use dot notation for this property.', | ||
| fix: (fixer) => | ||
| fixer.replaceTextRange([node.object.range[1], node.range[1]], `${node.optional ? '?.' : '.'}${name}`), |
There was a problem hiding this comment.
This autofix breaks valid code. I tested (input)['field'] and it becomes (input.field. 123['toString']() becomes 123.toString(), which is also invalid. Oxlint still exits 0 after writing the file.
Can we preserve parentheses and handle numeric receivers here, with tests for both cases?
🤖 Generated by the review-pr skill
There was a problem hiding this comment.
Fixed. The fixer finds the opening bracket token and preserves the full receiver text, including parentheses. Numeric receivers are wrapped before adding dot access, so (input)['field'] becomes (input).field and 123['toString']() becomes (123).toString(). Added regression cases for both, plus optional access and parenthesized property names. The reported cases fail with the old fixer and pass now.
6823f73 to
d82cc54
Compare
d82cc54 to
8db5cae
Compare
8db5cae to
bb25efe
Compare
9847250 to
635e5b8
Compare
WHY are these changes introduced?
Oxlint's native rules leave gaps in the existing CLI lint conventions. Prepare replacements before removing ESLint in #8211.
WHAT is this pull request doing?
Add independent JavaScript rules for naming, member and import ordering, workspace boundaries, unused imports, public API documentation, and core/Node conventions. Parse TSDoc directly. Focused tests cover these rules, including an Oxlint integration test that rejects loading ESLint or its upstream plugins.
This intermediate PR keeps the existing compatibility adapter and ESLint pass active. The final PR activates the independent rules and removes that dependency tree. The independent replacements cover repository conventions, with limitations documented in #8211; they do not reproduce every upstream option or behavior.
Enable the JSON-output command rule, preserve generated-file exemptions, and retain the public plugin exports. Keep the security emitter's exemption while compatibility remains active. Preserve generated import spacing and enable array formatting so regeneration matches the committed files. Normalize the integration test’s Node preload path for Windows, including paths with spaces. Run plugin tests in separate processes and serialize their files on Windows to limit native-buffer memory use. Run Nx plugins in-process in the integration test so detached workers cannot keep its temporary directory locked on Windows. Retry temporary-directory cleanup after child processes exit.
Validation
Full lint, frozen installation, and all 92 plugin tests passed. Uncached GraphQL generation leaves no generated-file changes. All 77 plugin tests also pass in the final ESLint-free setup. All non-e2e GitHub Actions checks pass, including the Windows test matrix.
Checklist