Skip to content

Lint with ESLint 10 and typescript-eslint 8, in a flat config - #42

Merged
Kinflou merged 1 commit into
mainfrom
deps/eslint-10-flat-config
Nov 16, 2026
Merged

Kinflou merged 1 commit into
mainfrom
deps/eslint-10-flat-config

Conversation

@Kinflou

@Kinflou Kinflou commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Stacked on #45 (bundling), which is on main as soon as #45 merges. Moves linting from ESLint 8 and typescript-eslint 6 to ESLint 10.15.0 and typescript-eslint 8.72.2, with a flat config.

What changed

  • eslint.config.mjs replaces .eslintrc.json, which is removed. .vscodeignore names the new file where it named the old one.
  • package.json: eslint ^8.0.0 to ^10.15.0, @typescript-eslint/parser and /eslint-plugin ^6.0.0 to ^8.72.2, and a new @stylistic/eslint-plugin ^6.0.0 (see semi). lint is eslint src: flat config has no --ext, so the files pattern in the config says what is linted.
  • typescript stays on ^5 (typescript-eslint 8.72.2 supports <6.1.0).
  • CHANGELOG entry.

The same rules

.eslintrc.json eslint.config.mjs
@typescript-eslint/naming-convention: warn same Still there in 8, same default options.
@typescript-eslint/semi: warn, semi: off @stylistic/semi: warn Removed in typescript-eslint 8 (its formatting rules moved to ESLint Stylistic, which typescript-eslint's migration guide names). Same name and default (always). Core semi exists in ESLint 10 but is deprecated and does not know TypeScript syntax (type aliases, abstract and declared members), which is what the @typescript-eslint version added. The semi: off line goes with it: a flat config with no extends has no core semi on to switch off.
curly, eqeqeq, no-throw-literal: warn same Core rules, all still in ESLint 10.
parser: @typescript-eslint/parser, parserOptions.ecmaVersion: 6, sourceType: module languageOptions with the same three
plugins: ["@typescript-eslint"] plugins: { '@typescript-eslint', '@stylistic' } An object in flat config.
ignorePatterns: out, node_modules, .vscode-test globalIgnores(['out/**', '.vscode-test/**']) node_modules is ignored by default.
eslint src --ext ts eslint src with files: ['**/*.ts']

There was no extends before and there is none now, so only these five rules run; I did not add the recommended sets (that would be new rules, not a migration). Nothing is turned off, and the two inline eslint-disable-next-line @typescript-eslint/naming-convention in src/extension.ts still name a rule that exists.

Findings in the code

None new. The lint output on this branch is the same 24 warnings, 0 errors, as on main: all @typescript-eslint/naming-convention, in src/resolve.test.ts, on environment-variable names used as object keys (PATH, FLATPAK_ID, RUST_LOG, CLICOLOR_FORCE, ...); the lines and columns match. They are the existing warnings and I left them as warnings.

Lint can now fail CI. ci.yml's Lint TypeScript step had continue-on-error: true, so an error never failed the job. It is gone. Warnings still exit 0, so the 24 do not fail the step; an error (a rule set to error, a config that does not load, a parser failure) does. On this branch the step passes with ✖ 24 problems (0 errors, 24 warnings).

Alerts

This pull request clears 1 more: minimatch 9.0.3 (alert 9) is gone, as @typescript-eslint 8 no longer pins it. Across the stack, 53 of 54 are cleared and all 10 shipped ones.

Remaining (1): minimatch, alert 79 (a denial of service in globs; every version from 7.0.0 up to below 11.0.1 is in its range, fixed in 11.0.1). The lock holds minimatch 10.2.6 because @vscode/vsce 4.1.1 depends on ^10.2.6 and typescript-eslint 8.72.2's typescript-estree on ^10.2.2; both are the latest releases. ESLint 10 itself uses minimatch 11.0.8. No upgrade within those ranges clears it. Decision for you: a resolutions entry for minimatch ^11 (I did not add one), or wait for vsce and typescript-eslint to move. It is development-only: the .vsix holds no node_modules, and the bundle's only minimatch is vscode-languageclient's 5.1.9.

The .vsix

Nothing in the package changes with this pull request: since #45 it holds the bundle and no node_modules, so the development tree (here minimatch 10 and brace-expansion 5 replacing eslint 8's minimatch 3) cannot reach it. Package Test's bundle report on this branch lists the same packages as #45, with balanced-match, brace-expansion and minimatch now all vscode-languageclient's own, and the Node 16 load check passes. The .vsix is .eslintrc.json-free as before; eslint.config.mjs is in .vscodeignore.

CI

ci.yml does not run on pull requests whose base is not main, so Lint and Compile and Package Test ran on #46 (this branch against main, a throwaway, closed): run 43779128244 passed, with the lint output above. On this pull request: Release Extension (all six Package jobs), Flatpak, Lint and CodeQL.

@Kinflou
Kinflou force-pushed the deps/vsce-4-node-22 branch from 4035b3e to d5ae639 Compare November 16, 2026 00:02
@Kinflou
Kinflou force-pushed the deps/eslint-10-flat-config branch from 2305732 to acc9b42 Compare November 16, 2026 00:13
@Kinflou
Kinflou changed the base branch from deps/vsce-4-node-22 to deps/bundle-esbuild November 16, 2026 00:13
@Kinflou
Kinflou force-pushed the deps/eslint-10-flat-config branch from acc9b42 to b202a0b Compare November 16, 2026 00:23
@Kinflou
Kinflou changed the base branch from deps/bundle-esbuild to main November 16, 2026 00:23
@Kinflou
Kinflou marked this pull request as ready for review November 16, 2026 00:23
@Kinflou Kinflou closed this Nov 16, 2026
@Kinflou Kinflou reopened this Nov 16, 2026
@Kinflou
Kinflou merged commit 7c7b933 into main Nov 16, 2026
46 checks passed
@Kinflou
Kinflou deleted the deps/eslint-10-flat-config branch November 16, 2026 00:42
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