-
-
Notifications
You must be signed in to change notification settings - Fork 678
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
Rule Proposal: vue/no-shadow
#101
Comments
|
@mysticatea i'm about to start working on this but can you explain me what do you mean by edit. i will wait till @mysticatea finish his parser |
I'm sorry for the delay. @michalsnik It's the good name. @armano2 Each Incidentally, I think that this rule should consider the properties of components are defined as well. <template>
<ol v-for="i in 5"><!-- "i" is already declared in the upper scope. -->
</ol>
</template>
<script>
export default {
data() {
return {i: 0}
}
}
</script> So I think the mostly logic of this rule will be shared with #98. |
@mysticatea @michalsnik if no one is working on it, i can take care of it |
* Add rule `no-template-shadow`. fixes #101 * fix/merge changes with master * Update tests suite, review suggestions * Add more test cases * Change no-template-shadow category to strongly-recommended
Please describe what the rule should do:
no-shadow
should report variable definitions ofv-for
directives orscope
attributes if those shadows the variables in parent scopes.What category of rule is this? (place an "X" next to just one item)
[ ] Enforces code style
[X] Warns about a potential error
[ ] Suggests an alternate way of doing something
[ ] Other (please specify:)
Provide 2-3 code examples that this rule will warn about:
The text was updated successfully, but these errors were encountered: