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
Conversation
LGTM |
|
||
```js | ||
/* eslint-disable */ | ||
|
||
// Disables all rules between comments |
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.
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: |
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.
Keeping the wording consistent
LGTM |
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. |
Agreed with the user that this could be clearer, figured I could take a few minutes to try to make it better :)