Docs: Remove readonly/writable global logic from no-undef (fixes #11963)#12053
Docs: Remove readonly/writable global logic from no-undef (fixes #11963)#12053platinumazure merged 2 commits intoeslint:masterfrom mdjermanovic:issue11963
Conversation
platinumazure
left a comment
There was a problem hiding this comment.
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. |
kaicataldo
left a comment
There was a problem hiding this comment.
LGTM. Thanks for contributing!
|
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
writableflag 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.