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: Improve examples for no-case-declarations (fixes #6716) #7920

Merged
merged 1 commit into from Jan 18, 2017
Merged

Docs: Improve examples for no-case-declarations (fixes #6716) #7920

merged 1 commit into from Jan 18, 2017

Conversation

venikx
Copy link
Contributor

@venikx venikx commented Jan 15, 2017

What is the purpose of this pull request? (put an "X" next to item)

[x] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

PR for the following issue #6716

What changes did you make? (Give an overview)
I added two examples where no-case-declarations are used correctly, one declaration outside the switch-statement and one using var.
The first the block scope of a case is introduced I added a comment to make it clearer where brackets should be used.

Is there anything you'd like reviewers to focus on?
I have troubles with an appropriate commit message. Is it too vague? If so, any proposals, since it's hard to keep in the 72 character limit?

@mention-bot
Copy link

@rangelke, thanks for your PR! By analyzing the history of the files in this pull request, we identified @arv, @pedrottimark and @scriptdaemon to be potential reviewers.

@jsf-clabot
Copy link

jsf-clabot commented Jan 15, 2017

CLA assistant check
All committers have signed the CLA.

@eslintbot
Copy link

LGTM

Copy link
Contributor

@arv arv left a comment

Choose a reason for hiding this comment

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

LGTM

For the title I think something shorter like "Improve examples for no-case-declarations" would work.

@@ -39,7 +39,11 @@ Examples of **correct** code for this rule:
/*eslint no-case-declarations: "error"*/
/*eslint-env es6*/

/* Declarations outside switch-statements are valid */
Copy link
Contributor

Choose a reason for hiding this comment

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

By looking at other example code I think it is more common to use // comments.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll update!

@eslintbot
Copy link

LGTM

@venikx
Copy link
Contributor Author

venikx commented Jan 15, 2017

@arv The appveyor build failed, could it be because of the name change of my commit?

@venikx venikx changed the title Docs: add two extra examples for no-case-declarations (fixes #6716) Docs: Improve examples for no-case-declarations (fixes #6716) Jan 15, 2017
@vitorbal vitorbal added documentation Relates to ESLint's documentation accepted There is consensus among the team that this change meets the criteria for inclusion good first issue Good for people who haven't worked on ESLint before labels Jan 18, 2017
@vitorbal
Copy link
Member

vitorbal commented Jan 18, 2017

@rangelke Thanks, this looks good! The appveyor build is green, maybe it just wasn't finished yet when you checked.

@vitorbal vitorbal merged commit 3c1e63b into eslint:master Jan 18, 2017
@venikx venikx deleted the issue6716 branch January 18, 2017 15:58
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 6, 2018
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 good first issue Good for people who haven't worked on ESLint before
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants