Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

chore(SIGPG-7819): upgrade ESLint from v8 to v10 with flat config#857

Open
khamiltonuk wants to merge 1 commit intomasterfrom
SIGPG-7819-upgrade-eslint
Open

chore(SIGPG-7819): upgrade ESLint from v8 to v10 with flat config#857
khamiltonuk wants to merge 1 commit intomasterfrom
SIGPG-7819-upgrade-eslint

Conversation

@khamiltonuk
Copy link
Copy Markdown
Collaborator

What changed

  • Upgraded ESLint from v8.57.0 to v10.2.0 (two major versions)
  • Migrated from legacy .eslintrc.js to flat config (eslint.config.mjs)
  • Replaced abandoned eslint-config-react-app@7.0.1 with direct plugin dependencies: typescript-eslint, eslint-plugin-react, eslint-plugin-react-hooks,
    eslint-plugin-jsx-a11y, eslint-plugin-import
  • Added @eslint/compat to wrap plugins that use removed ESLint 10 context methods
  • Removed --ext flag from lint script (removed in ESLint 9+)
  • Bumped minimum Node from >=20.0.0 to >=20.19.0 (ESLint 10 requirement)
  • Added vitest@1.6.0 as direct dev dependency
  • All rules from eslint-config-react-app carried over; no effective rule changes

How to test

  1. npm ci --legacy-peer-deps
  2. npm run lint — 0 errors, 0 warnings
  3. npm run test — 204 Cypress component tests pass
  4. npm run test:ssr — 2 SSR vitest tests pass

Additional notes

  • --legacy-peer-deps needed at install because some plugins haven't declared ESLint 10 peer deps yet (works fine at runtime)
  • @eslint/compat wrappers can be removed once plugins update their APIs
  • New tseslint.configs.recommended rules not in the old config (no-explicit-any, no-empty-object-type, no-require-imports) turned off to avoid
    introducing new noise

Migrate from legacy .eslintrc.js to flat config (eslint.config.mjs).
Replace abandoned eslint-config-react-app with direct plugin dependencies:
typescript-eslint, eslint-plugin-react, eslint-plugin-react-hooks,
eslint-plugin-jsx-a11y, and eslint-plugin-import.

- Add @eslint/compat wrappers for plugins using removed ESLint 10 APIs
- Carry over all rules from eslint-config-react-app
- Remove --ext flag from lint script (removed in ESLint 9+)
- Bump minimum Node to >=20.19.0 (ESLint 10 requirement)
- Add vitest as direct dev dependency for SSR tests
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