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: clarify usage of inline disable comments (fixes #6335) #6347

Merged
merged 1 commit into from Jun 10, 2016

Conversation

kaicataldo
Copy link
Member

@kaicataldo kaicataldo commented Jun 9, 2016

Agreed with the user that this could be clearer, figured I could take a few minutes to try to make it better :)

@eslintbot
Copy link

LGTM

@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @btmills, @nzakas and @MikeMcl to be potential reviewers


```js
/* eslint-disable */

// Disables all rules between comments
Copy link
Member Author

Choose a reason for hiding this comment

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

After looking at this again, having these explanation comments is REALLY confusing when we're telling users to look at how to format comments to disable rules inline. I think it's clearer with them gone.

alert('foo');
```

You can also disable specific rules for an entire file:
You can also disable or enable specific rules for an entire file:
Copy link
Member Author

Choose a reason for hiding this comment

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

Keeping the wording consistent

@eslintbot
Copy link

LGTM

@ilyavolodin
Copy link
Member

LGTM. @pedrottimark Just a note for the future, we should add a section somewhere that explains that globals, eslint and exported are always block style comments and are hoisted, but eslint-disable/eslint-enable are block style but not hoisted. And eslint-disable-line and eslint-disable-next-line are always inline and not hoisted.

@nzakas nzakas merged commit dcd4ad7 into master Jun 10, 2016
@kaicataldo kaicataldo deleted the fixes6335 branch June 19, 2016 03:56
@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
archived due to age This issue has been archived; please open a new issue for any further discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants