Skip to content

build(deps): migrate eslint 8 to 10 flat config + plugin updates - #154

Open
megheaiulian wants to merge 1 commit into
mainfrom
chore/bump-deps-eslint
Open

build(deps): migrate eslint 8 to 10 flat config + plugin updates#154
megheaiulian wants to merge 1 commit into
mainfrom
chore/bump-deps-eslint

Conversation

@megheaiulian

Copy link
Copy Markdown

Summary

Migrate from eslint 8 (eslintrc) to eslint 10 (flat config), plus update all eslint-related plugins to their latest majors.

Package changes

Package From To Notes
eslint 8.57 ^10.4 Flat config only, --ext removed
@typescript-eslint/* (2 pkgs) 7.18 typescript-eslint@^8 (1 pkg) Unified package
eslint-plugin-unicorn 49 ^72 2 rule renames, many new rules
eslint-plugin-jest 27 ^29 Flat config via flat/recommended
eslint-config-prettier 9 ^10 Flat config via /flat subpath
eslint-import-resolver-node 0.3 ^0.4 exports-aware resolution by default
eslint-plugin-import 2.32 eslint-plugin-import-x@^4 Fork with eslint 10 support (upstream hasn't updated peer deps)
New: globals ^17 Replaces env: { node: true }
New: @eslint/js ^10 Provides js.configs.recommended

Config changes

  • Delete .eslintrc.cjs + .eslintignore
  • Create eslint.config.mjs (flat config)
  • Lint script: drop --ext .ts,.js (extensions now via files globs)
  • engines.node: >=20.19>=22 (unicorn v72 requires >=22)
  • no-unused-vars: caughtErrors: "none" to preserve old behavior
  • Ignore runtime/** (eslint --fix was modifying shipped runtime code)
  • Disable many new unicorn v72 rules (too noisy for this project)
  • Disable import-x/named (can't verify .ts named exports without type info)

Rule renames applied

Old New
unicorn/prefer-json-parse-buffer unicorn/consistent-json-file-read
unicorn/prevent-abbreviations unicorn/name-replacements
import/no-unresolved (inline) import-x/no-unresolved

Why eslint-plugin-import-x instead of eslint-plugin-import?

eslint-plugin-import@2.32 (latest) has peer dep eslint: ^8 || ^9 — doesn't support eslint 10. eslint-plugin-import-x is a maintained fork with identical rules, flat config support, and eslint 10 compatibility. Rule names use import-x/ prefix instead of import/.

Source changes (auto-fixed by eslint --fix)

  • Removed unused eslint-disable comments (rules no longer triggered in v10)
  • Updated import/no-unresolvedimport-x/no-unresolved in inline comments
  • Minor: split('.', 2) instead of split('.') in one test

No runtime behavior changes — all changes are in lint config and dev tooling.

Verification

  • npm run lint — 0 errors, 1 harmless warning
  • npm run build — rollup + type emit
  • npm test — 4 suites, 114 tests, 314 snapshots pass (no snapshot changes)

What's NOT in this PR

  • Type-aware linting (projectService: true) — deferred to a separate follow-up
  • Fixing all new unicorn v72 rule violations — noisy/opinionated rules disabled for now, can be reviewed incrementally

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

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.97%. Comparing base (024efa8) to head (d696089).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant