Skip to content

Declaration for module #2124

Closed as not planned
Closed as not planned
@kovjogin

Description

@kovjogin

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions