-
-
Notifications
You must be signed in to change notification settings - Fork 682
Allow underscore prefix to disable no-unused-vars #1058
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
Comments
I think |
okey, |
IWANABETHATGUY
added a commit
to IWANABETHATGUY/eslint-plugin-vue
that referenced
this issue
Mar 8, 2020
implement proposal vuejs#1058 feat vuejs#1058
lisadeloach63
added a commit
to lisadeloach63/plugin-develop-vue
that referenced
this issue
Oct 7, 2022
…#1070) * feat: add fixable, no more error when unused variable with prefix _ implement proposal vuejs/eslint-plugin-vue#1058 feat vuejs/eslint-plugin-vue#1058 * fix: make fix optional,add varIgnorePattern * feat: change varIgnorepattern to ignorePattern, add test, update readme * docs: update doc
Viktor949
added a commit
to Viktor949/Eslint-Plugin-Vue
that referenced
this issue
Oct 1, 2023
…#1070) * feat: add fixable, no more error when unused variable with prefix _ implement proposal vuejs/eslint-plugin-vue#1058 feat vuejs/eslint-plugin-vue#1058 * fix: make fix optional,add varIgnorePattern * feat: change varIgnorepattern to ignorePattern, add test, update readme * docs: update doc
mattiassepp0302
added a commit
to mattiassepp0302/Eslint-Plugin-Vue-
that referenced
this issue
Nov 15, 2023
…#1070) * feat: add fixable, no more error when unused variable with prefix _ implement proposal vuejs/eslint-plugin-vue#1058 feat vuejs/eslint-plugin-vue#1058 * fix: make fix optional,add varIgnorePattern * feat: change varIgnorepattern to ignorePattern, add test, update readme * docs: update doc
Antontokarchuk0302
added a commit
to Antontokarchuk0302/Eslint-plugin
that referenced
this issue
Nov 16, 2023
…#1070) * feat: add fixable, no more error when unused variable with prefix _ implement proposal vuejs/eslint-plugin-vue#1058 feat vuejs/eslint-plugin-vue#1058 * fix: make fix optional,add varIgnorePattern * feat: change varIgnorepattern to ignorePattern, add test, update readme * docs: update doc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If one wants to repeat a block
n
times, av-for="i in n"
comes in handy.Now
vue/no-unused-vars
will rightfully complain thati
is unused.In TypeScript, there's a similar issue with function arguments that are not used on purpose. These are ignored as unused if prefixed with a
_
.How about allowing this for
no-unused-vars
as well? So thatv-for="_i in n"
would not warn, whilev-for="i in n"
would.The text was updated successfully, but these errors were encountered: