-
-
Notifications
You must be signed in to change notification settings - Fork 6
chore(deps): bump @typescript-eslint/parser from 8.56.1 to 8.58.0 in /docs #318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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:
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
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", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@typescript-eslint/parseris being bumped to8.58.0while@typescript-eslint/eslint-pluginremains at its currently resolved version of8.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 satisfies8.58.0at runtime, keeping them 4 minor versions apart is not recommended and could lead to subtle linting inconsistencies. Consider aligning the eslint-plugin to match:Prompt To Fix With AI