build(deps): migrate eslint 8 to 10 flat config + plugin updates - #154
Open
megheaiulian wants to merge 1 commit into
Open
build(deps): migrate eslint 8 to 10 flat config + plugin updates#154megheaiulian wants to merge 1 commit into
megheaiulian wants to merge 1 commit into
Conversation
Migrate from eslint 8 (eslintrc) to eslint 10 (flat config): - eslint 8.57 -> 10.8 (flat config only, --ext removed) - @typescript-eslint v7 -> typescript-eslint v8 (unified package) - eslint-plugin-unicorn 49 -> 72 (2 rule renames, many new rules disabled) - eslint-plugin-jest 27 -> 29 (flat/recommended config) - eslint-config-prettier 9 -> 10 (flat config via /flat subpath) - eslint-import-resolver-node 0.3 -> 0.4 (exports-aware resolution) - eslint-plugin-import -> eslint-plugin-import-x 4.17 (eslint 10 compat) - New deps: globals, @eslint/js Config changes: - Delete .eslintrc.cjs + .eslintignore - Create eslint.config.mjs (flat config) - Lint script: drop --ext, use files globs instead - engines.node: >=20.19 -> >=22 (unicorn v72 requires >=22) - Ignore runtime/** (eslint --fix was modifying shipped runtime code) - no-unused-vars caughtErrors: none (preserve old behavior) - Many new unicorn v72 rules disabled (too noisy for this project) - import-x/named off (can't verify .ts named exports without type info) Source changes (auto-fixed by eslint --fix): - Remove unused eslint-disable comments (rules no longer triggered) - import/no-unresolved -> import-x/no-unresolved in inline comments - Minor: split('.', 2) instead of split('.') in test
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #154 +/- ##
==========================================
- Coverage 98.97% 98.97% -0.01%
==========================================
Files 36 36
Lines 974 973 -1
Branches 317 317
==========================================
- Hits 964 963 -1
Misses 10 10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Migrate from eslint 8 (eslintrc) to eslint 10 (flat config), plus update all eslint-related plugins to their latest majors.
Package changes
eslint--extremoved@typescript-eslint/*(2 pkgs)typescript-eslint@^8(1 pkg)eslint-plugin-unicorneslint-plugin-jestflat/recommendedeslint-config-prettier/flatsubpatheslint-import-resolver-nodeeslint-plugin-importeslint-plugin-import-x@^4globalsenv: { node: true }@eslint/jsjs.configs.recommendedConfig changes
.eslintrc.cjs+.eslintignoreeslint.config.mjs(flat config)--ext .ts,.js(extensions now viafilesglobs)engines.node:>=20.19→>=22(unicorn v72 requires >=22)no-unused-vars:caughtErrors: "none"to preserve old behaviorruntime/**(eslint --fix was modifying shipped runtime code)import-x/named(can't verify .ts named exports without type info)Rule renames applied
unicorn/prefer-json-parse-bufferunicorn/consistent-json-file-readunicorn/prevent-abbreviationsunicorn/name-replacementsimport/no-unresolved(inline)import-x/no-unresolvedWhy
eslint-plugin-import-xinstead ofeslint-plugin-import?eslint-plugin-import@2.32(latest) has peer depeslint: ^8 || ^9— doesn't support eslint 10.eslint-plugin-import-xis a maintained fork with identical rules, flat config support, and eslint 10 compatibility. Rule names useimport-x/prefix instead ofimport/.Source changes (auto-fixed by eslint --fix)
eslint-disablecomments (rules no longer triggered in v10)import/no-unresolved→import-x/no-unresolvedin inline commentssplit('.', 2)instead ofsplit('.')in one testNo runtime behavior changes — all changes are in lint config and dev tooling.
Verification
npm run lint— 0 errors, 1 harmless warningnpm run build— rollup + type emitnpm test— 4 suites, 114 tests, 314 snapshots pass (no snapshot changes)What's NOT in this PR
projectService: true) — deferred to a separate follow-up