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

Docs: Remove readonly/writable global logic from no-undef (fixes #11963) #12053

Merged
merged 2 commits into from Aug 6, 2019
Merged

Docs: Remove readonly/writable global logic from no-undef (fixes #11963) #12053

merged 2 commits into from Aug 6, 2019

Conversation

mdjermanovic
Copy link
Member

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:

/*global b*/
/*eslint no-undef: "error"*/
b = 10;

It is indeed a correct code for this rule, but it isn't the right way to use eslint global variables in general.

@eslint-deprecated eslint-deprecated bot added the triage An ESLint team member will look at this issue soon label Aug 2, 2019
@aladdin-add aladdin-add added accepted There is consensus among the team that this change meets the criteria for inclusion documentation Relates to ESLint's documentation rule Relates to ESLint's core rules and removed triage An ESLint team member will look at this issue soon labels Aug 3, 2019
Copy link
Member

@aladdin-add aladdin-add left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Copy link
Member

@platinumazure platinumazure left a 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.

@mdjermanovic
Copy link
Member Author

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.

Copy link
Member

@platinumazure platinumazure left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Copy link
Member

@kaicataldo kaicataldo left a 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!

Copy link
Member

@g-plane g-plane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@platinumazure platinumazure merged commit fb08b7c into eslint:master Aug 6, 2019
@platinumazure
Copy link
Member

Merged! Thanks @mdjermanovic for contributing!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion documentation Relates to ESLint's documentation rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants