-
Notifications
You must be signed in to change notification settings - Fork 341
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
Can't lint .ts files when use vue-eslint-parser #864
Comments
@odanado this is what is happening now since version 2.x. I cloned your project but it is unclear to me what you think is not working correctly. Can you please provide steps to reproduce the problem. |
reproduction steps
captures
code/code.jscode/code.vuecode/code.ts |
The problem is that the
However that doesn't help since vue configuration require the |
Actually in your setup parser seems to be a valid option for the |
Fixed for 2.0.12 |
Until 2.0.12 is published as a vs code extension, I would like to share my workaround. I usually put .ts files in a directory in vue projects. I added a separate |
I also would like to share my workaround. Add {
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": [
"typescript"
]
} |
eslint-plugin-vue
usesvue-eslint-parser
as a parser.https://github.com/vuejs/eslint-plugin-vue/blob/e8f130c20c0ba6213009e1230a294b0f091e57bb/lib/configs/base.js#L7
I need configure
@typescript-eslint/parser
inparserOptions.parser
so as to lint.ts
files.https://eslint.vuejs.org/user-guide/#usage
.ts
files aren't linted, because@typescript-eslint/parser
isn't configured inparser
options.reproduction repository: https://github.com/odan-sandbox/vscode-eslint-vue-typescript-reproduction
I suggest that include
"typescript"
ineslint.validate
by checking@ typescript-eslint
inplugins
orparserOptions.parser
.The text was updated successfully, but these errors were encountered: