You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[no-unsupported-features](docs/rules/no-unsupported-features.md)| disallow unsupported ECMAScript features on the specified version ||| ❌ |
92
-
|[no-unsupported-features/es-builtins](docs/rules/no-unsupported-features/es-builtins.md)| disallow unsupported ECMAScript built-ins on the specified version | ✅ ☑️ ✔️|||
93
-
|[no-unsupported-features/es-syntax](docs/rules/no-unsupported-features/es-syntax.md)| disallow unsupported ECMAScript syntax on the specified version | ✅ ☑️ ✔️|||
94
-
|[no-unsupported-features/node-builtins](docs/rules/no-unsupported-features/node-builtins.md)| disallow unsupported Node.js built-in APIs on the specified version | ✅ ☑️ ✔️|||
95
-
|[process-exit-as-throw](docs/rules/process-exit-as-throw.md)| require that `process.exit()` expressions use the same code path as `throw`| ✅ ☑️ ✔️|||
|[no-unsupported-features](docs/rules/no-unsupported-features.md)| disallow unsupported ECMAScript features on the specified version ||| ❌ |
90
+
|[no-unsupported-features/es-builtins](docs/rules/no-unsupported-features/es-builtins.md)| disallow unsupported ECMAScript built-ins on the specified version | ✅ |||
91
+
|[no-unsupported-features/es-syntax](docs/rules/no-unsupported-features/es-syntax.md)| disallow unsupported ECMAScript syntax on the specified version | ✅ |||
92
+
|[no-unsupported-features/node-builtins](docs/rules/no-unsupported-features/node-builtins.md)| disallow unsupported Node.js built-in APIs on the specified version | ✅ |||
93
+
|[process-exit-as-throw](docs/rules/process-exit-as-throw.md)| require that `process.exit()` expressions use the same code path as `throw`| ✅ |||
-`plugin:n/recommended` considers both CommonJS and ES Modules. If [`"type":"module"` field](https://medium.com/@nodejs/announcing-a-new-experimental-modules-1be8d2d6c2ff#b023) existed in package.json then it considers files as ES Modules. Otherwise it considers files as CommonJS. In addition, it considers `*.mjs` files as ES Modules and `*.cjs` files as CommonJS.
128
-
-`plugin:n/recommended-module` considers all files as ES Modules.
129
-
-`plugin:n/recommended-script` considers all files as CommonJS.
125
+
| Name | Description |
126
+
| :-- | :-- |
127
+
|`plugin:n/recommended`| Considers both CommonJS and ES Modules. If [`"type":"module"` field](https://medium.com/@nodejs/announcing-a-new-experimental-modules-1be8d2d6c2ff#b023) existed in package.json then it considers files as ES Modules. Otherwise it considers files as CommonJS. In addition, it considers `*.mjs` files as ES Modules and `*.cjs` files as CommonJS. |
128
+
|`plugin:n/recommended-module`| Considers all files as ES Modules. |
129
+
|`plugin:n/recommended-script`| Considers all files as CommonJS. |
130
130
131
-
Those preset config:
131
+
These preset configs:
132
132
133
133
- enable [no-process-exit](http://eslint.org/docs/rules/no-process-exit) rule because [the official document](https://nodejs.org/api/process.html#process_process_exit_code) does not recommend a use of `process.exit()`.
134
134
- enable plugin rules which are given ✅ in the above table.
Copy file name to clipboardExpand all lines: docs/rules/handle-callback-err.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,9 +68,9 @@ so you need a more flexible configuration to ensure that the rule reports all un
68
68
69
69
If the configured name of the error variable begins with a `^` it is considered to be a regexp pattern.
70
70
71
-
* If the option is `"^(err|error|anySpecificError)$"`, the rule reports unhandled errors where the parameter name can be `err`, `error` or `anySpecificError`.
72
-
* If the option is `"^.+Error$"`, the rule reports unhandled errors where the parameter name ends with `Error` (for example, `connectionError` or `validationError` will match).
73
-
* If the option is `"^.*(e|E)rr"`, the rule reports unhandled errors where the parameter name matches any string that contains `err` or `Err` (for example, `err`, `error`, `anyError`, `some_err` will match).
71
+
- If the option is `"^(err|error|anySpecificError)$"`, the rule reports unhandled errors where the parameter name can be `err`, `error` or `anySpecificError`.
72
+
- If the option is `"^.+Error$"`, the rule reports unhandled errors where the parameter name ends with `Error` (for example, `connectionError` or `validationError` will match).
73
+
- If the option is `"^.*(e|E)rr"`, the rule reports unhandled errors where the parameter name matches any string that contains `err` or `Err` (for example, `err`, `error`, `anyError`, `some_err` will match).
Copy file name to clipboardExpand all lines: docs/rules/no-callback-literal.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ When invoking a callback function which uses the Node.js error-first callback pa
8
8
9
9
When a function is named `cb` or `callback`, then it must be invoked with a first argument that is `undefined`, `null`, an `Error` class, or a subclass or `Error`.
0 commit comments