Repository navigation
[eslint-config-kibana] expand list of restricted globals - #15798
Merged
spalger merged 1 commit intoJan 3, 2018
Merged
Conversation
rhoboat
reviewed
Jan 3, 2018
rhoboat
left a comment
There was a problem hiding this comment.
Can you please double-(triple?)-check the casing of the restricted globals?
| 'closed', | ||
| 'confirm', | ||
| 'defaultStatus', | ||
| 'defaultstatus', |
There was a problem hiding this comment.
Dost my eyes deceive me? I see two of the same line here.
There was a problem hiding this comment.
Oh, one is capital S and one is lowercase s. Huh. Why this?
There was a problem hiding this comment.
rhoboat
approved these changes
Jan 3, 2018
rhoboat
left a comment
There was a problem hiding this comment.
Nevermind, LGTM. I see that we're using the list directly from create-react-app. 👍
| 'closed', | ||
| 'confirm', | ||
| 'defaultStatus', | ||
| 'defaultstatus', |
There was a problem hiding this comment.
Contributor
Author
patrykkopycinski
pushed a commit
to patrykkopycinski/kibana
that referenced
this pull request
May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have long struggled with the fact that variables like
errorandnameare actually globals in the browser, and when usingenv.browser: truein eslint uninitialized variables with those names are assumed to be references towindow.errorandwindow.name. Did you also know thatstatusis a global? That just bit me in e5206ed...This change to the eslint-config-kibana package defines 57 globals that should not be used, courtesy of create-react-app.
These globals are all still available if you use
window.{global}, but with this change eslint will tell you when you're using the globalnamevariable instead of the local one you might think you're using.