-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Chore: rename shadowed global #12862
Conversation
I'm not against this change if it would help, but as far as I know I believe this could be a bug in for (const commonjsHelpers.commonjsGlobal of nonCallableGlobals) {
traceMap[commonjsHelpers.commonjsGlobal] = {
[CALL]: true
};
} It looks like the local |
global is very much not a reserved word. |
I'm anyway 👍 to rename this variable because it's shadowing the global |
|
Though, |
Marking as accepted as I do think it's best not to shadow Node's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
Thanks for contributing! |
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[x] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
Tell us about your environment
What did you do? Please include the actual source code causing the issue.
use rollup to include eslint in the browser
What did you expect to happen?
bundle
eslint/lib/linter/linter.js
What actually happened? Please include the actual, raw output from ESLint.
rollup error:
What changes did you make? (Give an overview)
rename variable
global
tog
Is there anything you'd like reviewers to focus on?