chore: eslint v10 upgrade#2983
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Greptile SummaryThis PR upgrades ESLint from v9 to v10 and migrates all config files from Confidence Score: 5/5Safe to merge; all findings are P2 style suggestions that do not block functionality The ESLint v10 migration is mechanically correct — FlatCompat removed, flat/recommended adopted, import.meta.dirname substituted for __dirname boilerplate. Source-code linting fixes (cause chaining, const promotion, unused assignment removal) are all valid improvements. The three P2 comments on package.json (engines field accuracy, @types/eslint version, @types/command-line-args version) are housekeeping items that won't break anything at runtime. package.json — engines field and type package versions deserve a follow-up Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["npm run format:*"] --> B["eslint CLI v10"]
B --> C{Config target}
C -->|src/**| D["eslint.root.config.mjs"]
C -->|src/**/*.test.ts| E["eslint.test.config.mjs"]
C -->|integration/**| F["eslint.integration.config.mjs"]
D --> G["js.configs.recommended"]
D --> H["tsPlugin.configs['flat/recommended']"]
D --> I["Custom rules\n(no-floating-promises, etc.)"]
E --> G
E --> H
E --> J["Test-specific rules\n(max-nested-callbacks: 8)"]
F --> G
F --> H
F --> K["Integration rules\n(complexity, max-depth, etc.)"]
H --> L["@typescript-eslint/parser\nauto-registered"]
M["src/templates/eslint.config.mjs\n(generated into user projects)"] -->|same flat/recommended pattern| H
|
| "@semantic-release/npm": "13.1.4", | ||
| "@semantic-release/release-notes-generator": "14.1.0", | ||
| "@types/command-line-args": "5.2.3", | ||
| "@types/eslint": "9.6.1", |
There was a problem hiding this comment.
@types/eslint@9.6.1 may conflict with ESLint 10's bundled types
ESLint 10 was rewritten in TypeScript and ships its own type definitions. @types/eslint@9.6.1 is the DefinitelyTyped community package targeting the ESLint 9 API surface. Having both on the resolution path can cause duplicate/conflicting type declarations. Consider either removing @types/eslint entirely (relying on ESLint 10's own types) or checking whether a @types/eslint@10.x exists before keeping this entry.
| }, | ||
| "devDependencies": { | ||
| "@commitlint/cli": "20.4.3", | ||
| "@commitlint/config-conventional": "20.4.3", |
There was a problem hiding this comment.
@types/command-line-args@5.x types for a command-line-args@6.x runtime
command-line-args was bumped to 6.0.1 in dependencies (new direct dep in this PR), but @types/command-line-args remains at 5.2.3 in devDependencies. A major version bump typically means breaking API changes; if the 6.x API surface diverged from the 5.x types, TypeScript will silently accept incorrect call signatures. Consider updating @types/command-line-args to a version that targets v6, or verifying the API is identical.
8c871f4 to
f5f5e35
Compare
f5f5e35 to
2d997c8
Compare
Description
Upgrade to eslint 10 and make required updates.
...
End to End Test:
(See Pepr Excellent Examples)
Related Issue
Fixes #
Relates to #
Type of change
Checklist before merging