build(deps): migrate to ESLint flat config, eslint 10 & typescript-eslint 8#50
Merged
Merged
Conversation
…lint 8 Upgrades the lint toolchain that Dependabot could not bump piecemeal (#35/#44/#42 each failed on peer conflicts): - eslint 8 -> 10, @typescript-eslint/{parser,eslint-plugin} 5 -> the unified `typescript-eslint` 8 meta package, add @eslint/js + globals - replace eslint-plugin-import (no eslint 10 support) with the maintained eslint-plugin-import-x 4 + eslint-import-resolver-typescript - port .eslintrc.json to eslint.config.mjs (flat config), kept non-type-checked to preserve the existing rule profile - lint script: `eslint --ext .ts,.tsx .` -> `eslint .` Fallout fixed: node globals for JS build scripts (previously unlinted), remove an unused `deps` binding and a now-stale eslint-disable directive (no-empty-function left typescript-eslint recommended in v6+). Lint: 0 errors (down from 171 warnings; 6 pre-existing warnings remain).
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.
Summary
Upgrades the lint toolchain as one coherent change. Dependabot split this into separate PRs (#35 eslint 10, #44
@typescript-eslint/parser8, #42@typescript-eslint/eslint-plugin8) that each failed atnpm cion peer conflicts, because these packages must move together and ESLint 9/10 requires a flat-config migration. This PR supersedes all three.Changes
@typescript-eslint/{parser,eslint-plugin}5 → the unifiedtypescript-eslint8 meta package; add@eslint/js+globals.eslint-plugin-import(no ESLint 10 support — peers cap at^9) with the actively maintainedeslint-plugin-import-x4 +eslint-import-resolver-typescript. Same rules,import-x/*namespace..eslintrc.json→eslint.config.mjs(flat config), replicating the previous setup (js + typescript-eslint + import recommended,electron,typescript, browser/node globals, config-file override). Kept non-type-checked to preserve the existing rule profile — enabling type-aware linting is a separate, larger change.eslint --ext .ts,.tsx .→eslint ..Fallout fixed
scripts/*.mjs), which the old--ext .ts,.tsxnever linted.depsbinding inregister.test.tsand a now-staleeslint-disableforno-empty-function(that rule left typescript-eslintrecommendedin v6+; v8 also promotesno-unused-varsto error).Verification
npm ciclean from the new lockfile ·npm audit→ 0 vulnerabilitiesnpm run lint→ 0 errors (down from a 171-warning baseline; 6 pre-existing warnings remain —import-x/no-duplicates,no-named-as-default-member)tsc --noEmitcleanFollow-up
Once merged, Dependabot PRs #35, #44 and #42 become obsolete and can be closed. The remaining failing majors (#43 typescript 7, #33 @electron/fuses 2) stay blocked upstream —
typescript-eslintstill requirestypescript <6.1.0.