Skip to content

fix(flat): remove unused deprecation plugin import - #229

Merged
xiyu95 merged 2 commits into
mainfrom
fix/remove-unused-deprecation-import-flat-config
Apr 7, 2026
Merged

fix(flat): remove unused deprecation plugin import#229
xiyu95 merged 2 commits into
mainfrom
fix/remove-unused-deprecation-import-flat-config

Conversation

@xiyu95

@xiyu95 xiyu95 commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Removes unused eslint-plugin-deprecation import from flat.mjs
  • eslint-plugin-deprecation@3 bundles an older @typescript-eslint/utils that references LegacyESLint, which was removed in ESLint 10 — importing the plugin crashes ESLint 10 even though it was never used in any config object
  • Consuming projects should use @typescript-eslint/no-deprecated (the modern equivalent, available in @typescript-eslint v7+) directly in their own eslint.config.mjs

Test plan

  • Verify flat.mjs works without errors under ESLint 10
  • Confirm consuming projects can use @typescript-eslint/no-deprecated as the replacement rule

xiyu95 added 2 commits April 7, 2026 07:48
eslint-plugin-deprecation v3 bundles an older @typescript-eslint/utils
that references LegacyESLint, which was removed in ESLint 10. The import
was unused — consuming projects are expected to configure their own
deprecation rule with the correct tsconfig path.

Use @typescript-eslint/no-deprecated in consuming projects instead.
…nal peer dep

- Add inline comment in flat.mjs explaining why eslint-plugin-deprecation is
  excluded and pointing to @typescript-eslint/no-deprecated as the replacement
- Mark eslint-plugin-deprecation as optional in peerDependenciesMeta so flat
  config consumers don't get spurious peer dep warnings
@xiyu95
xiyu95 enabled auto-merge (squash) April 7, 2026 15:13

@darrenjaneczek darrenjaneczek left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@xiyu95
xiyu95 merged commit bbe33f8 into main Apr 7, 2026
11 checks passed
@xiyu95
xiyu95 deleted the fix/remove-unused-deprecation-import-flat-config branch April 7, 2026 15:33
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.

2 participants