-
-
Notifications
You must be signed in to change notification settings - Fork 681
Add allow
rule option to vue/no-template-shadow
#2317
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
To match the A PR to implement this is welcome 🙂 |
Thanks for your reply, I did not even notice that he core rule already had this feature :D I'm not so sure if I am able to contribute with a PR, but maybe I can try to have a look in the next few days if I can free some time and maybe share some insights (not sure if I can properly contribute with code) |
vue/no-template-shadow
to error or warningallow
rule option to vue/no-template-shadow
@stefanobartoletti @FloEdelmann Hello! I had some free time today and took a stab at it, I hope it's ok 🙏 #2323 |
@mussinbenarbia thanks for taking care of this! |
What rule do you want to change?
vue/no-template-shadow
Does this change cause the rule to produce more or fewer warnings?
Slightly few warnings, in selected occurrences
How will the change be implemented? (New option, new default behavior, etc.)?
Probably the best way is to set a new option to the existing rule, something like this:
I think it can be useful to have the ability to set a whitelist for well known variable names that are allowed to be shadowed, while still being able to throw errors or warnings in all other cases.
It could be possible to have certain selected variable names that have to remain the same (maybe for third party libraries constraints, or for some coding convention), while also wanting to prevent this behavior globally.
The text was updated successfully, but these errors were encountered: