Skip to content

Swap lint to ESLint 10 on a flat config - #339

Merged
jtklein-agents merged 1 commit into
spec/333-eslint-10-flat-configfrom
336-swap-lint-to-eslint-10-flat-config
Nov 23, 2026
Merged

jtklein-agents merged 1 commit into
spec/333-eslint-10-flat-configfrom
336-swap-lint-to-eslint-10-flat-config

Conversation

@jtklein-agents

Copy link
Copy Markdown
Owner

Summary

Closes #336. Second child of #333.

eslint.config.js (flat, ESLint 10)
├── ignores            # build dirs, src/test/lintFixtures/
├── base presets       # @eslint/js, typescript-eslint recommended + stylistic
├── process globals    # main, preload, page, tests, config files
├── repo style         # @stylistic indent/comma-dangle/space-in-parens/multiline-ternary/semi/quotes, import-x, lodash
├── hooks (page)       # react-hooks recommended
└── TypeScript rules
-.eslintrc.cjs                  # eslint-config-react-app, ESLint 8
+eslint.config.js
+src/lint.test.ts               # lints known-bad fixtures through the real config
+src/test/lintFixtures/         # cycleA/B, hook, semi, quotes
  • Autofix: whitespace, quotes and the small autofixable reports.
  • Hand edits: two no-unsafe-declaration-merging disables in Alignment.ts (the interface and the class both report) and one no-inferrable-types disable in Run.ts (the autofix turned code: undefined = undefined into implicit any).
  • Dependencies: ESLint 10 plus six direct plugins added; eslint-config-react-app, the two @typescript-eslint/* packages and the resolutions pins removed.

Evidence

  • Before: import-x/no-cycle reported nothing on a real TS cycle; semicolons and quotes were unchecked.
    After: src/lint.test.ts asserts reports for import-x/no-cycle, react-hooks/rules-of-hooks, @stylistic/semi, @stylistic/quotes on the fixtures, and yarn lint is clean:
yarn lint                 -> 0 problems, --max-warnings 0
yarn typecheck:baseline   -> pass
vitest run                -> 68 files, 475 tests passed

Merge Danger

Door: two-way

Blast Radius: lint and dev tooling only; no runtime code changes beyond whitespace, quotes and three comments. ESLint prints a MODULE_TYPELESS_PACKAGE_JSON warning for eslint.config.js (harmless; silencing it needs "type": "module", out of scope).

🤖 Generated with Claude Code

Replace .eslintrc.cjs and eslint-config-react-app with eslint.config.js, make every plugin a direct dev dependency, autofix the new style reports, and add a test that lints known-bad fixtures through the real config.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@jtklein-agents
jtklein-agents merged commit aa6345b into spec/333-eslint-10-flat-config Nov 23, 2026
9 checks passed
@jtklein-agents
jtklein-agents deleted the 336-swap-lint-to-eslint-10-flat-config branch November 23, 2026 07:59
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