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
ReferenceTracker returns potential references #12826
Comments
I have verified this bug. Agreed this should be fixed! |
Unfortunately, it looks like there wasn't enough interest from the team Thanks for contributing to ESLint and we appreciate your understanding. |
Unfortunately, it looks like there wasn't enough interest from the team Thanks for contributing to ESLint and we appreciate your understanding. |
Reopening this because this is a bug that results in the autofixer changing the execution of code. |
Hy @kaicataldo I am looking into this issue. Can we explain a bit more how can I proceed ? |
We could add an option in ReferenceTracker to return only certain references, or maybe change the rule to not use ReferenceTracker and manually find a smaller set of references. @mysticatea what do you think about this? |
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using?
default
Please show your full configuration:
Configuration
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
Online Demo Link
What did you expect to happen?
I guess this shouldn't be reported and auto-fixed.
What actually happened? Please include the actual, raw output from ESLint.
Auto-fixed to:
Are you willing to submit a pull request to fix this bug?
Yes, though this would need some design first.
The problem is:
eslint-utils.ReferenceTracker
returns references that may be the targeted global in some code paths, but may be something else in other code paths. This feature might be not suitable for some rules.The text was updated successfully, but these errors were encountered: