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
Docs: Remove readonly/writable global logic from no-undef (fixes #11963) #12053
Conversation
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.
The changes already present LGTM, thanks!
I think we should add a "See Also" section that links to no-redeclare
and/or no-implicit-globals
, as needed. Additionally, the descriptions should name the rules which do handle global writes.
It's done now, please check is it ok. I thought the convention is not to mention other rules except in the Related Rules section, but I see now there are many examples like this, and it makes sense of course when it is important. |
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.
LGTM. Thanks for contributing!
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!
Merged! Thanks @mdjermanovic for contributing! |
What is the purpose of this pull request? (put an "X" next to item)
[X] Documentation update #11963
What changes did you make? (Give an overview)
Removed an example that does not apply to this rule.
Removed
writable
flag as it's irrelevant for this rule.Modified a 'write' example (
b = 10
) to 'read' example (var bar = a + 1
).Is there anything you'd like reviewers to focus on?
Should there be a 'correct' example like this:
It is indeed a correct code for this rule, but it isn't the right way to use eslint global variables in general.