-
Notifications
You must be signed in to change notification settings - Fork 31
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
Some rules enforced in .ts but not .vue? #18
Comments
Also, if I manually include the rules from typescript-eslint within eslintrc, the rules are enforced in .vue files as expected.
|
I got the same issue, eslint can't detect the ts part in .vue. I don't think turn off the no-undef rule is a good way, especially in js,ts mixed project. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My eslintrc.json:
I add the following to both a .ts and .vue file (with script lang set to ts):
In both files @typescript-eslint/no-unused-vars raises a warning as expected.
However, prefer-const and no-var are only detected (as errors) in the .ts file. These two rules are activated in the extended config https://github.com/typescript-eslint/typescript-eslint/blob/498f397ff3898dde631f37311615b555f38a414e/packages/eslint-plugin/src/configs/eslint-recommended.ts#L27
Why do these rules not kick in within .vue? Sorry if I'm missing something!
The text was updated successfully, but these errors were encountered: