Skip to content

feat: add TypeScript IntelliSense support with eslint-typegen #2770

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

Merged
merged 6 commits into from
Jul 2, 2025

Conversation

2nofa11
Copy link
Contributor

@2nofa11 2nofa11 commented Jun 26, 2025

Summary

Add TypeScript IntelliSense support via eslint-typegen with ESM migration for ESLint v9.0+ compatibility.

Changes

  • Integrate eslint-typegen for TypeScript definitions
  • Convert eslint.config.js to eslint.config.mjs (required for eslint-typegen)
  • Install with --legacy-peer-deps due to ESLint version requirements
  • Update all imports to ESM format

Benefits

  • TypeScript IntelliSense for ESLint configurations
  • Modern ESLint v9.0+ compatibility
  • Improved developer experience with type safety

Screenshot

Before(No TypeScript Support) After(TypeScript IntelliSense Active)
No TypeScript Support TypeScript IntelliSense Active

close #2757

Copy link

changeset-bot bot commented Jun 26, 2025

🦋 Changeset detected

Latest commit: 9e53387

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
eslint-plugin-vue Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@2nofa11 2nofa11 force-pushed the add/eslint-typegen branch from 896a67b to 73d68c9 Compare June 26, 2025 12:52
@ota-meshi
Copy link
Member

Thank you for this PR!
Furthermore, can you make it so that we can provide rule types from this package using the low-level API?
https://github.com/antfu/eslint-typegen/blob/main/README.md#low-level-api

@2nofa11
Copy link
Contributor Author

2nofa11 commented Jun 28, 2025

@ota-meshi
I've implemented rule type generation using eslint-typegen's low-level API. (856784e)

Implementation:

  • Added npm run typegen command (like that @antfu/eslint-config)
  • Uses pluginsToRulesDTS from eslint-typegen/core
  • Generated file lib/eslint-typegen.d.ts is currently gitignored

Should I also add lib/eslint-typegen.d.ts to this PR, or would you prefer CI automation for the distribution strategy?

@2nofa11 2nofa11 force-pushed the add/eslint-typegen branch from 7501517 to 557d8e7 Compare July 2, 2025 07:53
Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

Copy link
Member

@FloEdelmann FloEdelmann left a comment

Choose a reason for hiding this comment

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

Looks good to me, too. Thank you 🙂

@FloEdelmann FloEdelmann merged commit 4cf87be into vuejs:master Jul 2, 2025
12 checks passed
@github-actions github-actions bot mentioned this pull request Jul 2, 2025
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.

Add TypeScript IntelliSense support with eslint-typegen
3 participants