Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More β†’
Socket
Sign inDemoInstall
Socket

eslint-plugin-n

Package Overview
Dependencies
Maintainers
2
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-n - npm Package Compare versions

Comparing version 16.4.0 to 16.5.0

10

lib/rules/no-unsupported-features/es-builtins.js

@@ -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 @@ },

2

lib/rules/no-unsupported-features/node-builtins.js

@@ -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`.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚑️ by Socket Inc