Skip to content
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

Suggest to forbid shadowing of global variables #59

Open
dominique-pfister opened this issue Nov 4, 2020 · 0 comments · May be fixed by #209
Open

Suggest to forbid shadowing of global variables #59

dominique-pfister opened this issue Nov 4, 2020 · 0 comments · May be fixed by #209
Assignees
Labels
enhancement New feature or request

Comments

@dominique-pfister
Copy link

dominique-pfister commented Nov 4, 2020

Every now and then, I embarrassingly add a process function in a non-class file (e.g. an OpenWhisk action) that should process some input. This happily shadows the process global object in that file, leaving me baffled for some time until I find the problem.

Is there a reason we don't forbid shadowing global variables in:

'no-shadow': ['error', {
allow: ['_'],
}],

by adding:

          builtinGlobals: true,
@dominique-pfister dominique-pfister added the enhancement New feature or request label Nov 4, 2020
@dominique-pfister dominique-pfister linked a pull request Apr 10, 2024 that will close this issue
@dominique-pfister dominique-pfister self-assigned this Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant