-
-
Notifications
You must be signed in to change notification settings - Fork 666
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
Allow linting of <script> section only if lang="ts" #2012
Comments
Guys, you advise opening new issues like this and reaching out and yet an issue can go weeks and have absolutely no response. It's kind of frustrating. Why don't you make some effort to give some response??? I'd really like some direction on this, it's rather screwing up my linting. Quote: "If you can't find the right solution, don't hesitate to reach out in issues – we're happy to help!" |
Please watch your tone, this is an open-source repository and we all work in our spare time on triaging, commenting, reviewing and coding. Limiting rules to only |
这个功能是有必要的,因为如果设置规则 |
I've hit the same issue as @yuntian001 . I have I'm not too sure if this is possible, but maybe there's a way to automatically skip rules that requires In the mean time, the best solution is to always set |
I think this is currently impossible unless eslint-plugin-vue do a huge refactor to use eslint's preprocessor api. |
I'd like to be able to lint my
.vue
file script sections only iflang="ts"
. At the moment ESLint is lintingscript
sections that are just plain JS (ie.<script setup>
) as well as TS ones (<script setup lang="ts">
) when I runeslint . --ext .vue --ignore-path .gitignore
. A good solution would perhaps be to be able to say in.eslintrc.cjs
which script section languages should be linted. Another solution would be to allow to set which rules get linted based on language; obviously certain TS rules I apply do not apply to plain JS because plain JS cannot set types.Tell us about your environment
The text was updated successfully, but these errors were encountered: