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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
prevent-abbreviations: event_ is suffixed with underscore #667
Comments
Can you check your code? I guess |
This is expected, unless you didn't use |
I checked the code and there is no shadowed variable There is an Could this be reopened? |
There is a global |
Actually, I thought about this before, do we really need check scope up? |
Ah, that makes sense. Hmm. Could the suffixing only be done if the same-name variable is actually used in the scope? If it's not used, it shouldn't be necessary to give it a different name |
I.e. only suffix in a case like this: let error
try {
foo()
} catch (error_) {
error = error_
} but not in this case: let error
try {
foo()
} catch (error) {
console.error(error)
} |
Yes, it could be done, but @bmish bring the I'm not sure what should we do |
I don't know how ESLint works, but could the rule detect whether |
I think we don't read use configs in any other rule. BTW: what's your opinion about child scopes? try {
} catch (x) {
// ^ we have a rule fix this to error, currently we are fixing to `error`, not `error_`, should we check the child scope?
try {
} catch (error) {
}
} |
Fine to fix to |
Yep, I prefer |
Let's close this issue for now, we can discuss the avoidCapture logic later. |
Why is
event_
suffixed with underscore? 馃The text was updated successfully, but these errors were encountered: