Skip to content

chore: Fix ESLint by lifting typescript-eslint to a TypeScript 5.9 compatible version (no-changelog) - #211

Merged
bennycode merged 1 commit into
mainfrom
fix/eslint-setup
Sep 29, 2026
Merged

bennycode merged 1 commit into
mainfrom
fix/eslint-setup

Conversation

@bennycode

Copy link
Copy Markdown
Owner

ESLint currently fails before linting any file, on a clean npm ci and in the pre-commit hook:

ESLint couldn't find the plugin "@typescript-eslint/eslint-plugin".

@tstv/eslint-config@3.2.4 pins typescript-eslint 8.19.0, which only supports TypeScript below 5.8. Because the repo uses TypeScript 5.9, npm installed the plugin with its own nested TypeScript 5.7. ESLint 8 only resolves plugins from the project root, so it can't find it there. Pointing ESLint at the nested copy doesn't help either: TypeScript 5.7 rejects erasableSyntaxOnly and module: node20 from @tstv/tsconfig-common.

This adds an npm overrides entry that moves typescript-eslint to the latest 8.x. That release still supports ESLint 8 and TypeScript 5.9, so npm installs a single TypeScript again and the plugin sits at the root.

Upgrading to @tstv/eslint-config v4 would also fix this, but it requires ESLint 9 and the flat config format, which is a bigger migration. The override can be dropped once that happens.

…mpatible version

@tstv/eslint-config 3.2.4 pins typescript-eslint 8.19.0, which only supports TypeScript below 5.8. npm therefore installed the plugin with a nested TypeScript 5.7, where ESLint 8 cannot resolve the plugin and the parser rejects options from @tstv/tsconfig-common (erasableSyntaxOnly, module node20). The override moves typescript-eslint to the latest 8.x, which supports ESLint 8 and TypeScript 5.9, so there is a single TypeScript install again.
@bennycode
bennycode merged commit 220c33e into main Sep 29, 2026
2 checks passed
@bennycode
bennycode deleted the fix/eslint-setup branch September 29, 2026 13:53
bennycode added a commit that referenced this pull request Oct 1, 2026
Upgrades @inquirer/prompts 8, ts-morph 28, TypeScript 6, ESLint 10,
@tstv/eslint-config 4, Vitest 5 and @types/node 26, plus the latest
minor versions of the remaining packages.

TypeScript stays on 6.0. TypeScript 7 no longer ships the JavaScript
compiler API, typescript-eslint supports TypeScript below 6.1 only, and
ts-morph 28 bundles TypeScript 6.0.

ESLint 10 requires the flat config format, so .eslintrc.json moves to
eslint.config.mjs. The typescript-eslint override from #211 is no longer
needed. Source files are autofixed for the new block comment and key
sorting rules of @tstv/eslint-config 4.

@inquirer/prompts 8 requires Node.js 20.17 or newer, so "engines" now
states that. @inquirer/core is added as a direct dependency because the
CLI imports ExitPromptError from it. Vitest is limited to src, because
Vitest 4+ no longer excludes dist by default.
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