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

Declaration for module #2124

Closed
kovjogin opened this issue Apr 3, 2023 · 2 comments
Closed

Declaration for module #2124

kovjogin opened this issue Apr 3, 2023 · 2 comments

Comments

@kovjogin
Copy link

kovjogin commented Apr 3, 2023

I want to write my own rule specific to my project only. It should work vue script setup.
I write rules in typescript.

I need defineScriptSetupVisitor in my ts file.

import { defineScriptSetupVisitor } from 'eslint-plugin-vue/lib/utils';

or

import utils from 'eslint-plugin-vue/lib/utils';

I got message:

"TS7016: Could not find a declaration file for module 'eslint-plugin-vue/lib/utils'. 'eslint-plugin-vue/lib/utils/index.js' implicitly has an 'any' type.   Try npm i --save-dev @types/eslint-plugin-vue if it exists or add a new declaration (.d.ts) file containing declare module 'eslint-plugin-vue/lib/utils';"

Am I doing something wrong or is this package not usable with typescript?

@ota-meshi
Copy link
Member

this package not usable with typescript?

Yes.

@ota-meshi ota-meshi closed this as not planned Won't fix, can't repro, duplicate, stale Apr 3, 2023
@MartinX3
Copy link

@ota-meshi Did it change since we got eslint.config.ts with ESLint 9.9.0?

Vue: Could not find a declaration file for module eslint-plugin-vue.
path node_modules/.pnpm/ eslint-plugin-vue@9.27.0_eslint@9.9.0_jiti@1.21.6_/ node_modules/ eslint-plugin-vue/ lib/ index. js
implicitly has an any type.
Try npm i --save-dev @types/ eslint-plugin-vue if it exists or add a new declaration (.d. ts) file containing declare module 'eslint-plugin-vue';

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

No branches or pull requests

3 participants