Skip to content
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

Fix Linter type import in index.d.ts #2572

Merged
merged 1 commit into from
Oct 14, 2024
Merged

Conversation

ocavue
Copy link
Contributor

@ocavue ocavue commented Oct 11, 2024

Thanks for adding TypeScript declarations in the latest v9.29.0.

I found an issue when using the new declaration. In the lib/index.d.ts, the Linter namespace is pointing to typings/eslint/index.d.ts. However, typings/ is not included in the final NPM package, therefore the declarations in index.d.ts is not working.

This issue can be fixed by adding a single line import type { Linter } from 'eslint' as shown in this PR.

Other code-styling changes included in this PR are made by Prettier based on eslint-plugin-vue's Prettier config.


Just FYI, the latest eslint has already includes TypeScript declarations, which means you don't need @types/eslint and perhaps also typings/eslint/index.d.ts anymore once eslint-plugin-vue updated to the latest version of eslint (currently eslint-plugin-vue is still using eslint@8).

@ocavue ocavue marked this pull request as ready for review October 11, 2024 22:54
@FloEdelmann FloEdelmann linked an issue Oct 14, 2024 that may be closed by this pull request
2 tasks
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.

Thanks, this looks good!

Also, given there is already a duplicate PR (#2575), this seems to fix the issue for others as well.

@FloEdelmann FloEdelmann merged commit aa476d6 into vuejs:master Oct 14, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The new config types in 9.29.0 are broken
2 participants