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: Describe options in rule under Strict Mode #6312
Conversation
LGTM |
fe98f41
to
6198c9f
Compare
LGTM |
|
||
A strict mode directive at the beginning of a script or function body enables strict mode semantics. | ||
A strict mode directive is a `"use strict"` literal string expression at the beginning of a script or function body. It enables strict mode semantics. |
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.
You can omit "string expression" in this description.
6198c9f
to
5507896
Compare
LGTM |
1 similar comment
LGTM |
5507896
to
510c268
Compare
|
||
All strict mode directives are flagged as unnecessary if ECMAScript modules or implied strict mode are enabled (see [Specifying Parser Options](../user-guide/configuring#specifying-parser-options)). This behaviour does not depend on the rule options, but can be silenced by disabling this rule. | ||
* `"safe"` (default) corresponds either of the following options: | ||
* `"global"` if ESLint considers a file to be a **Node.js** or **CommonJS** module |
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.
We probably just want to say "CommonJS" because Node.js will support ES modules within the next year
LGTM |
510c268
to
f886656
Compare
Lgtm |
The only rule under Strict Mode
Additional changes:
"never"
option to be the last active option, so it does not separate"global"
and"function"
from"safe"
Hint: The diff gets confusing after safe. At that point, you might click View and compare the markdown view to the Web site: http://eslint.org/docs/rules/strict