Draft
Conversation
✅ Deploy Preview for fakerjs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## next #3773 +/- ##
==========================================
- Coverage 98.88% 98.82% -0.07%
==========================================
Files 886 886
Lines 3061 3061
Branches 556 556
==========================================
- Hits 3027 3025 -2
- Misses 30 32 +2
Partials 4 4
🚀 New features to boost your workflow:
|
afb05fb to
a9fad69
Compare
a9fad69 to
265aa50
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR replaces ESLint with oxlint — a much faster linter written in Rust by the oxc project.
What changed:
oxlint+oxlint-tsgolint(for type-aware linting)oxlint.config.tseslint-disablecomments tooxlint-disablewhere the rule exists, removed them where it doesn't.gitignorepnpm prettier), a follow-up PR will look into oxfmtoxlint-tsgolint, so rules likeconsistent-type-exports,restrict-plus-operands,switch-exhaustiveness-checketc. all work with full type informationPerformance: The lint step in CI went from 52s (
nextbranch) to 1s (this PR) — a 52x speedup.Rules that are no longer enforced
Not all ESLint rules have an oxlint equivalent yet. Below is a breakdown of what we're temporarily losing, grouped by how far away support is.
Rules not yet implemented (no type info needed)
These are on the oxc roadmap but don't have a concrete timeline:
logical-assignment-operators||=,&&=,??=jsdoc/require-jsdocsrc/**/*.ts) — this is a big one for us since it guards our public API docsjsdoc/sort-tags@template,@internal,@remark,@param,@returns, ...)jsdoc/tag-linesoff, but noting for completeness)Rules not yet implemented (need type-aware linting via tsgolint)
These rules require TypeScript type information. The oxc project has a companion tool called tsgolint for this, but it currently only supports a limited set of type-aware rules. None of ours are among them yet:
typescript/naming-conventionT-prefix for type params conventiontypescript/no-mixed-enumstypescript/no-unsafe-argumentanyto typed function paramstypescript/require-await(TS version)asyncwithoutawait, with type-aware promise checkingIntentionally dropped (not needed with oxlint)
@stylistic/padding-line-between-statements@stylisticplugin. Closed as "not planned" (oxc#11435). Will be covered by oxfmt in the future.eslint-plugin-file-progresseslint-plugin-prettierpnpm prettier --check .in CI. This was just the bridge between ESLint and Prettier. Will be replaced by oxfmt in a future PR.Other notes
test/require.spec.ctsis ignored by oxlint due to a parser limitation with top-levelawaitin.cts(CommonJS) filesdocs/.vitepress/components/api-docs/method.vueadded to ignore list — oxlint's.vuesupport is limitedcypress/added to ignore list — separate tsconfig causes a parser errorno-unsafe-type-assertion,require-array-sort-compare) are explicitly turned off since they weren't in our original ESLint config — we can evaluate enabling them separately.gitignore, so no need to duplicate those patterns inignorePatternsTest plan
pnpm run lintpasses with 0 warnings and 0 errors (176 rules, type-aware enabled)pnpm run testpasses (51 test files, 51,621 tests)next