Repository navigation
Description
Parent
#333 (Spec: move lint to ESLint 10 on a flat config). Second of two tickets; #335 lands the hand fixes first.
What to build
yarn lint runs ESLint 10 from one flat config, eslint.config.js, and the old .eslintrc.cjs and eslint-config-react-app are gone. The command, its arguments, the lint and lint:fix scripts and both CI workflows that call yarn lint are unchanged. The tree passes with zero warnings.
The Implementation Decisions section of #333 is the rule-by-rule source: read it for the config. The starting point is the draft on the throwaway branch prototype/eslint-flat-config. That draft predates the rule decisions, so adjust it to them; do not copy it.
-
Config shape, in this order: global ignores; base presets (
@eslint/jsrecommended, typescript-eslintrecommendedandstylistic, no type-checked presets); hand-written blocks that set globals for shell main, preload, page, tests and config files; one block with the repo's style rules for every file; the hooks preset for page code; one block of TypeScript rules. The typescript-eslint parser parses every linted file. The linted file set stays as it is. -
Dependencies: ESLint 10. Add as direct dev dependencies
@eslint/js,typescript-eslint,@stylistic/eslint-plugin,eslint-plugin-import-x,eslint-plugin-react-hooks,globals. Keepeslint-plugin-lodash. Removeeslint-config-react-app, the two@typescript-eslint/*dev dependencies, and theresolutionspins on@typescript-eslint/*. -
Rules: the kept, dropped, carried-over and switched-off lists in Spec: move lint to ESLint 10 on a flat config #333. Rule names and every reference to them become
import-x/*and@stylistic/*; nothing is aliased to the old names. -
Cycle check:
import-x/no-cycleneeds the plugin's TypeScript settings and a resolver that knows.tsand.tsx, or it passes while checking nothing. From the prototype:settings: { ...importX.flatConfigs.typescript.settings, 'import-x/resolver-next': [ createNodeResolver( { extensions: [ '.ts', '.tsx', '.js', '.mjs', '.json' ] } ) ], },
-
Autofixes: run
yarn lint:fixfor the JSX indentation reports, the quote reports and the remaining small autofixable reports (prefer-constand the typescript-eslint stylistic rules). -
Inline disable: one, with a reason, for
@typescript-eslint/no-unsafe-declaration-mergingat the deliberate interface and class merge in the page store's alignment module. -
Test: one new Vitest test lints a small known-bad fixture through the real
eslint.config.jsin a child Node process and asserts a report for each of: a two-file TypeScript import cycle (import-x/no-cycle), a hook called outside a component (react-hooks/rules-of-hooks), a missing semicolon (@stylistic/semi), a double-quoted string (@stylistic/quotes). The fixture is linted under the page block's rules yet stays out of theyarn lintfile set; how is your choice. Prior art is the source-maps test, which loads the shell build config in a child Node process. The test does not assert on the config object's contents. -
Local doc edit: remove the sentence in the TypeScript leaves agent doc that requires explicit return types and cites
explicit-module-boundary-types. That doc is excluded from git, so the edit is local and not part of the pull request.
Fallback, only on a blocker the prototype did not hit: ESLint 9 with eslint-plugin-import unchanged. Report the blocker before taking it.
Acceptance criteria
-
yarn lintruns ESLint 10 fromeslint.config.jsand passes with zero warnings -
.eslintrc.cjsis deleted;eslint-config-react-app, the two@typescript-eslint/*dev dependencies and theresolutionspins on them are gone frompackage.json - Every plugin the config imports is a direct dev dependency
- The four formatting rules run from
@stylisticwith today's options, and@stylistic/semiand@stylistic/quotesare on - The kept, dropped, carried-over and switched-off rules match Spec: move lint to ESLint 10 on a flat config #333; no rule or reference uses an
import/*name - The new Vitest test fails when any of the four rules stops reporting on the fixture, and the fixture produces no report in
yarn lint - Autofix changes are whitespace and quotes plus the small autofixable reports; the only hand edit to production code is the one inline disable
- The
lintandlint:fixscripts and the CI workflows are unchanged - The Vitest suite and
yarn typecheck:baselinepass - The explicit-return-types sentence is removed from the local TypeScript leaves agent doc
Activity
jtklein-agents commentedon Nov 23, 2026
Merged in #339 into spec/333-eslint-10-flat-config. CI green.