Open cbrgpl opened 3 months ago
I decided to turn off the rule, but I would like to have this possibility, because some component could be written in js due to some circumstances and I cannot disable js linting, but I want to use some useful rules for ts
I'm having the same issue. Using @typescript-eslint/eslint-plugin
and @typescript-eslint/parser
@ versions ^6.21
works, but is only compatible with typescript up to ^5.3
.
It's not optimal but at least fixes the issue you mentioned for now.
Before You File a Bug Report Please Confirm You Have Done The Following...
What version of ESLint are you using?
8.57.0
What version of
eslint-plugin-vue
andvue-eslint-parser
are you using?What did you do?
Configuration
```js { // ... files: [ '*.vue' ], parser: 'vue-eslint-parser', parserOptions: { parser: { 'js': '@babel/eslint-parser', 'ts': '@typescript-eslint/parser', }, project: [ './tsconfig.json' ], }, // ... } ```What did you expect to happen?
I expect
@typescript-eslint/consistent-type-imports
rule will work correctly. It requires providingproject
option for@typescript-eslint/parser
. If I don't lint*.vue
files it works correctly.What actually happened?
I get error. I tried to fix it and understood that happens because of both languages linting enabled. When I change config to this:
Eslint works correctly(but ignores js written components by obviously reasons). I suppose
@typescript-eslint/parser
does not get value ofproject
fromparserOptions
, when you configured config by the first wayLink to Minimal Reproducible Example
I have debuged it already
Additional comments
No response