Rule Change: no-implicit-globals lexicalBindings without functions #16328
Labels
archived due to age
This issue has been archived; please open a new issue for any further discussion
enhancement
This change enhances an existing feature of ESLint
rule
Relates to ESLint's core rules
Projects
What rule do you want to change?
no-implicit-globals
What change to do you want to make?
Implement suggestions
How do you think the change should be implemented?
A new option
Example code
What does the rule currently do for this code?
When using with lexicalBindings
/*eslint no-implicit-globals: ["error", {"lexicalBindings": true}]*/
it gives an errorWhat will the rule do after it's changed?
Not report an error for functions in global context.
e.g. if there was an option for that like:
/*eslint no-implicit-globals: ["error", {"lexicalBindingsVars": true}]*/
to only apply it to const/let, or alternatively a different value ('only-variables' or 'no-functions'):
/*eslint no-implicit-globals: ["error", {"lexicalBindings": "no-functions"}]*/
or
/*eslint no-implicit-globals: ["error", {"lexicalBindings": "only-variables"}]*/
The text was updated successfully, but these errors were encountered: