eslint-plugin-n
Advanced tools
Comparing version 16.4.0 to 16.5.0
@@ -17,2 +17,5 @@ /** | ||
globals: { | ||
AggregateError: { | ||
[READ]: { supported: "15.0.0" }, | ||
}, | ||
Array: { | ||
@@ -25,2 +28,5 @@ from: { [READ]: { supported: "4.0.0" } }, | ||
}, | ||
FinalizationRegistry: { | ||
[READ]: { supported: "14.6.0" }, | ||
}, | ||
Map: { | ||
@@ -72,2 +78,3 @@ [READ]: { supported: "0.12.0" }, | ||
allSettled: { [READ]: { supported: "12.9.0" } }, | ||
any: { [READ]: { supported: "15.0.0" } }, | ||
}, | ||
@@ -129,2 +136,5 @@ Proxy: { | ||
}, | ||
WeakRef: { | ||
[READ]: { supported: "14.6.0" }, | ||
}, | ||
WeakSet: { | ||
@@ -131,0 +141,0 @@ [READ]: { supported: "0.12.0" }, |
@@ -405,2 +405,24 @@ /** | ||
}, | ||
//-------------------------------------------------------------------------- | ||
// ES2021 | ||
//-------------------------------------------------------------------------- | ||
logicalAssignmentOperators: { | ||
ruleId: "no-logical-assignment-operators", | ||
cases: [ | ||
{ | ||
supported: "15.0.0", | ||
messageId: "no-logical-assignment-operators", | ||
}, | ||
], | ||
}, | ||
numericSeparators: { | ||
ruleId: "no-numeric-separators", | ||
cases: [ | ||
{ | ||
supported: "12.5.0", | ||
messageId: "no-numeric-separators", | ||
}, | ||
], | ||
}, | ||
} | ||
@@ -658,2 +680,10 @@ const keywords = Object.keys(features) | ||
"Nullish coalescing operators are not supported until Node.js {{supported}}. The configured version range is '{{version}}'.", | ||
//------------------------------------------------------------------ | ||
// ES2021 | ||
//------------------------------------------------------------------ | ||
"no-logical-assignment-operators": | ||
"Logical assignment operators are not supported until Node.js {{supported}}. The configured version range is '{{version}}'.", | ||
"no-numeric-separators": | ||
"Numeric separators are not supported until Node.js {{supported}}. The configured version range is '{{version}}'.", | ||
}, | ||
@@ -660,0 +690,0 @@ }, |
@@ -375,4 +375,2 @@ /** | ||
module.exports = { | ||
@@ -379,0 +377,0 @@ meta: { |
{ | ||
"name": "eslint-plugin-n", | ||
"version": "16.4.0", | ||
"version": "16.5.0", | ||
"description": "Additional ESLint's rules for Node.js", | ||
@@ -35,3 +35,3 @@ "engines": { | ||
"eslint-config-prettier": "^8.8.0", | ||
"eslint-doc-generator": "^1.4.3", | ||
"eslint-doc-generator": "^1.6.1", | ||
"eslint-plugin-eslint-plugin": "^5.1.0", | ||
@@ -38,0 +38,0 @@ "eslint-plugin-n": "file:.", |
@@ -153,14 +153,26 @@ # eslint-plugin-n | ||
This plugin provides three configs: | ||
<!-- begin auto-generated configs list --> | ||
| Name | Description | | ||
| :-- | :-- | | ||
| `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. | | ||
| `plugin:n/recommended-module` | Considers all files as ES Modules. | | ||
| `plugin:n/recommended-script` | Considers all files as CommonJS. | | ||
| | Name | | ||
| :- | :------------------------ | | ||
| π | `flat/mixed-esm-and-cjs` | | ||
| βοΈ | `flat/recommended` | | ||
| π’ | `flat/recommended-module` | | ||
| β | `flat/recommended-script` | | ||
| βοΈ | `recommended` | | ||
| π’ | `recommended-module` | | ||
| β | `recommended-script` | | ||
<!-- end auto-generated configs list --> | ||
About each config: | ||
- `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. | ||
- `recommended-module`: Considers all files as ES Modules. | ||
- `recommended-script`: Considers all files as CommonJS. | ||
These preset configs: | ||
- 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()`. | ||
- enable plugin rules which are given β in the above table. | ||
- enable plugin rules indicated by emojis in the [rules table](#-rules). | ||
- add `{ecmaVersion: 2021}` and etc into `parserOptions`. | ||
@@ -167,0 +179,0 @@ - add proper globals into `globals`. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
348832
9719
241