Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@docusaurus/tsconfig": "3.9.2",
"@docusaurus/types": "3.9.2",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.56.1",
"@typescript-eslint/parser": "^8.58.0",
Comment on lines 38 to +39
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Version mismatch between typescript-eslint packages

@typescript-eslint/parser is being bumped to 8.58.0 while @typescript-eslint/eslint-plugin remains at its currently resolved version of 8.54.0 (specifier ^8.0.0). The typescript-eslint packages are released together as a monorepo and are designed to be used at matching versions.

While the plugin's peer dependency (@typescript-eslint/parser@^8.54.0) technically satisfies 8.58.0 at runtime, keeping them 4 minor versions apart is not recommended and could lead to subtle linting inconsistencies. Consider aligning the eslint-plugin to match:

Suggested change
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.56.1",
"@typescript-eslint/parser": "^8.58.0",
"@typescript-eslint/eslint-plugin": "^8.58.0",
"@typescript-eslint/parser": "^8.58.0",
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/package.json
Line: 38-39

Comment:
**Version mismatch between typescript-eslint packages**

`@typescript-eslint/parser` is being bumped to `8.58.0` while `@typescript-eslint/eslint-plugin` remains at its currently resolved version of `8.54.0` (specifier `^8.0.0`). The typescript-eslint packages are released together as a monorepo and are designed to be used at matching versions.

While the plugin's peer dependency (`@typescript-eslint/parser@^8.54.0`) technically satisfies `8.58.0` at runtime, keeping them 4 minor versions apart is not recommended and could lead to subtle linting inconsistencies. Consider aligning the eslint-plugin to match:

```suggestion
    "@typescript-eslint/eslint-plugin": "^8.58.0",
    "@typescript-eslint/parser": "^8.58.0",
```

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines 38 to +39
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 This PR bumps @typescript-eslint/parser to 8.58.0 but leaves @typescript-eslint/eslint-plugin pinned at ^8.0.0, which pnpm resolves to 8.54.0—a 4-minor-version skew. The typescript-eslint project requires all @typescript-eslint/* packages to stay in sync because the plugin's rules depend on internal AST/scope types that must match the parser's output. To fix, update the eslint-plugin specifier in docs/package.json to ^8.58.0 as well.

Extended reasoning...

What the bug is and how it manifests

This PR bumps @typescript-eslint/parser from 8.56.1 to 8.58.0 but does not update @typescript-eslint/eslint-plugin, whose specifier ^8.0.0 remains broad enough that pnpm continues to resolve it to 8.54.0. The result is a 4-minor-version gap between the two packages. The typescript-eslint project ships all its packages together and explicitly documents that they must be kept at the same version; internally they share scope-manager, types, visitor-keys, type-utils, and utils packages that must all agree on AST shape and scope representations.

The specific code path that triggers it

The lockfile snapshot shows the divergence clearly:

  • @typescript-eslint/eslint-plugin@8.54.0 depends on scope-manager@8.54.0, types@8.54.0, visitor-keys@8.54.0, type-utils@8.54.0
  • @typescript-eslint/parser@8.58.0 depends on scope-manager@8.58.0, types@8.58.0, visitor-keys@8.58.0, typescript-estree@8.58.0

Both sets of internal packages coexist in node_modules. When ESLint runs, the parser produces an AST using 8.58.0 internal types, but the plugin's rules analyse that AST using 8.54.0 internal types—a structural mismatch.

Why existing code does not prevent it

The @typescript-eslint/eslint-plugin peer-dependency constraint only requires the parser to satisfy a broad semver range; it does not enforce version equality. pnpm satisfies the peer dependency by pointing the plugin at the newer parser version (as shown in the lockfile snapshot key), but the plugin's own bundled helpers remain at 8.54.0. No tooling enforces that all @typescript-eslint/* packages resolve to identical versions.

What the impact would be

Version 8.58.0 adds TypeScript 6 support, introducing new AST node kinds and scope constructs that the 8.54.0 plugin rules were not written against. If any project file uses TypeScript 6 syntax, the plugin may misinterpret or crash on AST nodes it does not recognise. Even without TS6 syntax, divergent internal type definitions can cause false positives or false negatives in type-aware rules. The 8.58.0 release also fixes several plugin rule bugs; those fixes do not apply to the 8.54.0 plugin running against a 8.58.0 parser. Although this affects only the docs linting toolchain (not production code), broken linting silently degrades code quality enforcement on every PR touching docs.

Step-by-step proof

  1. Before this PR: parser = 8.56.1, plugin = 8.54.0, 2-minor-version gap.
  2. This PR bumps parser to 8.58.0; plugin specifier ^8.0.0 is unchanged, so pnpm resolves plugin to 8.54.0, widening the gap to 4 minor versions.
  3. Lockfile confirms: @typescript-eslint/typescript-estree@8.58.0 depends on ts-api-utils@2.5.0 while the plugin's typescript-estree@8.54.0 uses ts-api-utils@2.4.0. Both versions are installed simultaneously.
  4. Running the docs lint script (eslint src --ext .ts,.tsx) exercises the mismatched combination on every CI run.

How to fix

Change line 38 of docs/package.json from:

"@typescript-eslint/eslint-plugin": "^8.0.0"

to:

"@typescript-eslint/eslint-plugin": "^8.58.0"

Then run pnpm install in docs/ to update the lockfile so both packages resolve to 8.58.0.

"docusaurus-plugin-llms": "^0.3.0",
"eslint": "^9.39.2",
"eslint-config-prettier": "^10.1.8",
Expand Down
Loading
Loading