build(deps): migrate to eslint 9 flat config - #17
Merged
Merged
Conversation
Unblocks eslint-plugin-react-refresh >=0.5, whose peer range requires eslint ^9||^10 and could not be satisfied under the legacy .eslintrc.cjs setup (PR #14's build failed on this exact ERESOLVE conflict). - eslint 8.57 -> 10.9, @typescript-eslint/{eslint-plugin,parser} -> the typescript-eslint meta package (8.69, flat-config native), eslint-plugin-react-refresh -> 0.5.6. - Replace .eslintrc.cjs with eslint.config.mjs; same rule set and per-file overrides (electron/ node globals, theme file exemptions), scoped to ts/tsx to match the old --ext ts,tsx behavior. - Fix two @typescript-eslint/no-unused-vars/no-unused-expressions hits in LogTable.tsx (ternary used for its side effect, now if/else) that the new recommended ruleset catches and the old one didn't. - Extend the ThemeToggle.tsx Fast Refresh exemption already used for theme.tsx (colocated constants, not worth splitting for).
There was a problem hiding this comment.
🟡 Changes recommended
The ESLint upgrade introduces a stricter Node engine requirement than the repo’s declared engines.node, which can cause local lint/tooling failures on “supported” Node versions.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Migrates the repo’s linting setup from ESLint 8 + legacy .eslintrc.cjs to ESLint 10 + flat config (eslint.config.mjs) to unblock newer eslint-plugin-react-refresh peer requirements and restore npm ci compatibility.
Changes:
- Upgraded linting dependencies (ESLint, TypeScript ESLint via
typescript-eslint,eslint-plugin-react-refresh) and adjusted thelintscript for flat config. - Replaced
.eslintrc.cjswitheslint.config.mjs, preserving prior rule intent and key file-specific overrides. - Refactored two side-effect ternaries in
LogTable.tsxinto explicitif/elseto satisfy stricter lint rules.
File summaries
| File | Description |
|---|---|
| src/components/LogTable.tsx | Rewrites side-effect ternaries to if/else to comply with updated lint rules. |
| package.json | Updates lint command and devDependencies to ESLint 10 + flat-config ecosystem. |
| package-lock.json | Locks the upgraded ESLint/tooling dependency graph. |
| eslint.config.mjs | Introduces ESLint flat config with TypeScript + React Hooks/Refresh rules and overrides. |
| .eslintrc.cjs | Removes legacy ESLint config. |
Review details
- Files reviewed: 4/5 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| "dev": "vite", | ||
| "build": "tsc && vite build && electron-builder", | ||
| "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", | ||
| "lint": "eslint . --report-unused-disable-directives --max-warnings 0", |
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.
Unblocks
eslint-plugin-react-refresh>=0.5, whose peer range requireseslint ^9||^10and couldn't be satisfied under the legacy.eslintrc.cjs(ESLint 8) setup — this is exactly what broke #14's
npm ci.@typescript-eslint/eslint-plugin+@typescript-eslint/parserfor thetypescript-eslintmeta package(8.69, flat-config native),
eslint-plugin-react-refresh→ 0.5.6..eslintrc.cjswitheslint.config.mjs— same rules andper-file overrides (electron/ node globals, theme-file Fast Refresh
exemptions), scoped to
**/*.{ts,tsx}to match the old--ext ts,tsx.@typescript-eslint/no-unused-expressionshits inLogTable.tsx(ternary used for its side effect — the new recommended ruleset catches
this, the old one didn't); rewritten as if/else, same behavior.
theme.tsxFast Refresh exemption toThemeToggle.tsx(colocated constants, not worth splitting the file for).
npm run lint && npm run typecheck && npm test && npm run buildall pass.