NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #4900 most downloaded on npm
Additional ESLint's rules for Node.js
Last release 7 years ago
no release in 18 months
Ships fairly regularly
a new release about every 3 months
Nearly every release is documented
notes for 57 of 59 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
60 releases · first in 2015
The many rules for Node.js in the ESLint core will be deprecated in ESLint 7.0.0. This release includes the clone of those core rules.
The many rules for Node.js in the ESLint core will be deprecated in ESLint 7.0.0. This release includes the clone of those core rules.
One column per quarter.
276a9ad0fa8d6db224aae6fe6d35146a3fac9377 updated node/no-deprecated-api rule to allow revoked deprecations.
node/no-unsupported-features/node-builtins rule based on Node.js 13.2.0.node/no-unsupported-features/es-syntax rule to recognize BigInt literal property names.globalThis.*.node/no-unsupported-features/es-builtins rule to recognize globalThis.node/no-deprecated-api rule to allow revoked deprecations.node/no-unsupported-features/node-builtins rule to handle backporting properly.4b9c4d7d5deb9b66a6f37c0a440131500e51624f updated node/no-deprecated-api rule to recognize module.createRequireFromPath.
This release supports BigInt and Dynamic Imports if you are using ESLint 6.2.0 or later.
node/no-unsupported-features/es-syntax rule to recognize BigInt literals and import().node/no-unsupported-features/es-builtins rule to recognize BigInt, BigInt64Array, BigUint64Array, and Promise.allSettled.node/file-extension-in-import, node/no-extraneous-import, node/no-missing-import, and node/no-unpublished-import rules to recognize import().node/no-deprecated-api rule to recognize module.createRequireFromPath.plugin:node/recommended and the other configs.
node/no-exports-assign rule.exports global variable writable.node/*-import rules in CommonJS mode as well.node/no-exports-assign rule that disallows exports = {}.72de3a30a1d66414eaff3603ddc74628967a9ea3 updated eslint-utils for security fix.
no-callback-literal.eslint-utils for security fix.fd9d19d369fcea13518ca97b669b9e358cd137a8 updated no-deprecated-api to not suggest alternative APIs if it has not supported on configured Node.js versi…
no-deprecated-api to not suggest alternative APIs if it has not supported on configured Node.js version. Thank you, @Lalem001 !semver package to not crash on wildcard * version range.dfb4dc0202a9f9eb106b4dddb6c0f0205fabaff6 fixed the false positive of node/file-extension-in-import rule on scoped packages (#160).
node/file-extension-in-import rule on scoped packages (#160).7e0c2c5fa547598132441be57279e092517af08e updated [node/no-deprecated-api] rule to check new deprecated APIs in Node.js 12.
Update for Node.js v12 :tada:
^5.16.0 and >=6.0.0.require() such as node/no-missing-require rule to check require.resolve() as well.plugin:node/recommended preset.62ba6425a73845c235e93d706b7d826f70853c40 fixed the wrong messages of node/no-deprecated-api rule (#142).
node/no-deprecated-api rule (#142).no-unpublished-(bin|import|require) rules (#115, #126).58607951356dc63cd33366282eeda98ebd587dd0 updated node/no-deprecated-api rule to disallow new deprecated APIs. Especially, it includes legacy URL API.
This release focuses on supporting new things that were added between Node.js 8.7.0 and 11.0.0.
node/no-deprecated-api rule to disallow new deprecated APIs.node/no-unsupported-features/node-builtins rule to detect new APIs.node/prefer-global/text-decoder rule for new global varaible TextDecoder.node/prefer-global/text-encoder rule for new global varaible TextEncoder.It fixed false positive that the node/no-unsupported-features/node-builtins reports the process.emitWarning method on Node.js >=6 <8. It was supported
node/no-unsupported-features/node-builtins reports the process.emitWarning method on Node.js >=6 <8. It was supported since Node.js 6.0.0.removed a deprecated rule: [node/no-unsupported-features].
>=6.>=4.19.1. (the node/recommended preset is supporting only ESLint >=5.0.0)node/recommended config.
parserOptions.ecmaVersion to 2019 from 2018.plugins: ["node"].10.6.0.
assert.equal are deprecated. Use stricter methods such as assert.strictEqual or the strict mode (assert.strict) instead.Buffer or require("buffer").Buffer consistently.console or require("console") consistently.process or require("process") consistently.URLSearchParams or require("url").URLSearchParams consistently.URL or require("url").URL consistently.I extracted the logic which detects certain globals and modules and those properties to the eslint-utils package. I wish it to be useful for your ESLint plugins.
All commits: 5260039c77fd7e6368c1a5808f90462e5beec6f3...890ee63e98ef95ec5a27f50f42188102526d81b1
Nothing published for this version
234703cc58d1d8ebfdf0be367d958bf6682b299f fixed a regression that node/no-unsupported-features crashes if engines field exists but engines.node field d
node/no-unsupported-features crashes if engines field exists but engines.node field doesn't exist in package.json (#109). Thanks @ZauberNerd !400e20a00a1620f986eb91317d6d26e1b049f8dd updated node/no-deprecated-api rule to support new deprecated APIs. Now the rule recognizes the following API…
node/no-unsupported-features rule to support ES2018 syntactic features. Now the rule recognizes the following syntax:
8.3.0)9.0.0)9.0.0)9.0.0)10.0.0)10.0.0)10.0.0)node/no-deprecated-api rule to support new deprecated APIs. Now the rule recognizes the following APIs:
async_hooks.currentIdasync_hooks.triggerIdmodule._debugpath._makeLongtls.parseCertStringplugin:node/recommended preset.Nothing published for this version
e7878e9cf66ce125f0c9617663d3e92db03fe454 fixed no-deprecated-api that has overlooked GLOBAL and root global variables which are deprecated in Node.js…
no-deprecated-api that has overlooked GLOBAL and root global variables which are deprecated in Node.js 6.0.0. (https://github.com/mysticatea/eslint-plugin-node/issues/92)0295a7f6608be458f5a380108bdc1406137b0ebe fixed that no-deprecated-api crashs on self-assigning of objects which have deprecated API.
no-deprecated-api crashs on self-assigning of objects which have deprecated API. (#87)47e0cc280856c5414b01fb331a71df222a857dcc added resolvePaths option to no-missing-require and no-missing-import rules. You can customize paths to try f
resolvePaths option to no-missing-require and no-missing-import rules. You can customize paths to try for when resolving importing.0e487f9aa7f5548e407f04f84446c9613203c962 updated no-deprecated-api rule for Node.js 8.
Notable changes are 2:
no-unpublish-import rule and no-unpublish-require rule.no-unsupported-features rule for Node.js 8.
4.0.0 if you don't specify the node version. It has been 0.10.0 before.SharedArrayBuffer and Atomics. Currently any versions of Node.js don't support those variables.no-deprecated-api rule for Node.js 8.
vm.runInDebugContext().no-unpublish-import rule and no-unpublish-require rule.
require() expressions or import declarations if those import extraneous packages.
no-unpublished-require and no-unpublished-import.no-unsupported-features about semver comparison. (#78)229778730248f73990cbf7c82788030e3aa8108e fixed that no-deprecated-api crashs on self-assigning of objects which have deprecated API.
#87 was backported to v4.
no-deprecated-api crashs on self-assigning of objects which have deprecated API. (#87)b2c68771449851c2a3473dddba387457a417e023 fixed a bug of node/no-unpublished-require and node/no-unpublished-import. Those had been handling some files
node/no-unpublished-require and node/no-unpublished-import. Those had been handling some files such as raedme.js as published files always even if the files exist in subdirectories. npm always publishes such files of only top level.113c68f5621c2f1f73ca7e97145e384fc7835ee4 fixed false positive of no-missing-require and no-missing-import rules that v4.2.0 introduced.
no-missing-require and no-missing-import rules that v4.2.0 introduced.61fcbb038b1bbbdc59e6c911cbb1fa4f11390578 deprecated [no-hide-core-modules] rule. This rule was based on an invalid assumption. Third-party modules nev…
17c8ae088c611b280685defbb0728456097c5b5d fixed the behavior of no-deprecated-api rule about indirect dependencies. The no-deprecated-api rule has igno…
require() expressions and import declarations if those import a third-party module which has the same name as core modules. Especially, if you depend on such modules indirectly and npm flattens dependencies, you can depend on such third-party modules before as you know it. This might cause unintentional behaviors.package.json explicitly.ignoreIndirectDependencies: true option.2991302d509d16f75c68518a6db3797ccd1e6be1 fixed the error message of no-deprecated-api about new Buffer() and Buffer(). Buffer.alloc and Buffer.from ar…
no-deprecated-api about new Buffer() and Buffer(). Buffer.alloc and Buffer.from are supported since Node 4.5.0.617287021603bdafaab08ab8391f0841f64fdbbe added new option ignoreModuleItems and ignoreGlobalItems to no-deprecated-api rule.
eslint-plugin-node 4 requires ESLint 3.1.0 or later.convertPath to several rules. This supports excluding files to convert. (#60)ignoreModuleItems and ignoreGlobalItems to no-deprecated-api rule. (#58)For example, when you use babel src --out-dir dist --ignore /__tests__/, the following setting would work:
{
"rules": {
"node/no-unpublished-import": ["error", {
"convertPath": [
{
"include": ["src/**/*.js"],
"exclude": ["**/__tests__/**/*.js"],
"replace": ["^src/(.+)$", "dist/$1"]
}
]
}]
}
}
Those options can be used to ignore the use of specific deprecated APIs.
For example, the following setting would ignore Buffer constructors:
{
"rules": {
"node/no-deprecated-api": ["error", {
"ignoreModuleItems": ["new buffer.Buffer()"],
"ignoreGlobalItems": ["new Buffer()"]
}]
}
}
143f50906034dbf64232d5aa574fe26eb5cbe019 fixed the false positive of no-unsupported-features rule about block-scoped functions and ES modules (#59).
no-unsupported-features rule about block-scoped functions and ES modules (#59).8275cfc9ce85cce951d9d94a6fe618bd7403f7b7 fixed node/no-unsupported-features rule to not crash if only ignores option was given (version option was omi
node/no-unsupported-features rule to not crash if only ignores option was given (version option was omitted).1bc22af34d7fbe6ff7cd94a67c3984f01236588b fixed the false positive of no-deprecated-api rule on Mac/Linux. Thank you, @ponko2 !
no-deprecated-api rule on Mac/Linux.I had published 2.1.4 to the latest tag. This release recovers the releasing mistake.
No change.
I had published 2.1.4 to the latest tag.
This release recovers the releasing mistake.
610b9052e7d7013101f1c2a09574f2949ffde8ef fixed no-deprecated-api crashing on assignments to undefined variables. (#55) Thank you, @not-an-aardvark !
no-deprecated-api crashing on assignments to undefined variables. (#55)ce465b8f719f4099d3285a8e611c71ce8bd16b33 added the check of new deprecated APIs in Node.js 7 into no-deprecated-api rule.
no-unsupported-features rule. (#46)no-deprecated-api rule. (#54)plugin:node/recommended config.
no-process-exit rule. (#53)node/no-unpublished-bin and node/process-exit-as-throw rules.no-unsupported-features about Unicode code point escapes.610b905 fixed no-deprecated-api crashing on assignments to undefined variables.
This cherry-picked 2 bug fixes from 3.x.
no-unsupported-features about Unicode code point escapes.no-deprecated-api crashing on assignments to undefined variables. (#55)d8495887cb3247c7b54dde25489663db5d7face8 changed no-deprecated-api rule allowing fs.existsSync function. The fs.existsSync function has been undepreca…
no-deprecated-api rule allowing fs.existsSync function. The fs.existsSync function has been undeprecated by Node v6.8.0.no-deprecated-api rule about Buffer constructor.e42d161072a8c08d56c5fc5d7f69d402fbf10104 fixed shebang rule to allow CLI flags in shebangs. (fixed #51)
shebang rule to allow CLI flags in shebangs. (fixed #51)v2.1.0 had caused the problem https://github.com/eslint/eslint/issues/7239 in ESLint repo.
v2.1.0 had caused the problem https://github.com/eslint/eslint/issues/7239 in ESLint repo.8cc8aaa6d91b0fe660d8a918b7793639f1fd1c77 added no-unpublished-bin rule. This rule warns the file if it's CLI entery point and if npm ignores it. For e
npm ignores it.{"bin": "bin/index.js", "files": ["lib"]}, in this case, bin/index.js is CLI entry point but files field does not include it. So npm install will fail.module.exports or exports.foo.9fabf7660693ed7387a07ae51cfd4b9d1fe158f0 eslint-plugin-node dropped supports of ESLint 1. Now it requires ESLint >=2.0.0.
eslint-plugin-node dropped supports of ESLint 1. Now it requires ESLint >=2.0.0.eslint-plugin-node has the plan to drop supports of ESLint 2 and Node.js 0.10/0.12. It will come at the end of 2016.fc86406cbaa5d61ef8ac092e038f8d02cedca24d fixed invalid peerDependencies for ESLint 3.0.0
ebe215114d433ba34ffb2952336b999edc71ad4e upgraded minimatch - https://nodesecurity.io/advisories/minimatch_regular-expression-denial-of-service
A preset config (plugin:node/recommended) was added (#38). Thank you @rkaneko !
Features:
plugin:node/recommended) was added (#38).Bug Fixes:
no-unsupported-features was fixed (#40).get and set identifiers for property shorthand syntax.Documents:
624aed0ead4aa1fd2a656de4c6ca5ca3e21ccb99 New no-deprecated-api rule was added. This rule warns accesses to deprecated API. More info...
Features:
no-deprecated-api rule was added.
This rule warns accesses to deprecated API. More info...c6f17623284425051c5182eb66787856a4986142 The following rules came to ignore the part which preceded by ! of import path. (fixes #36)
Enhancements:
! of import path. (fixes #36)
f59bfbaa2c79b08a6e10c62432a7408b53fd8b56 Schema of allowModules option has been fixed as it was too strict.
Bug Fixes:
allowModules option has been fixed as it was too strict.This version is trivial. Just tests for ESLint v1 have been fixed.
This version is trivial. Just tests for ESLint v1 have been fixed.
23f6fbaf166684acfa3fa81ba5cd218b5ef838c8 allowModules option has been added to the following rules. This rule would support platforms which have own a
Features:
allowModules option has been added to the following rules. This rule would support platforms which have own additional modules (e.g. electron).
90fce67bfd7ce8fa04b53fed75a05af662f7d940 no-unsupported-features gets to read the engines field of package.json when version was omitted (fixes #29)
Features:
no-unsupported-features gets to read the engines field of package.json when version was omitted (fixes #29)no-unsupported-features gets to support Node 6 (fixes #31)61ba0db370c27cde698feb2edf8282f4add814ef Supports of ESLint pre-release versions are dropped.
Breaking Changes:
Bug Fixes:
shebang rule had been reporting false positive if there are empty line(s) at the top of a file.Others:
e9ef1047e8e007bd8ac7dcd8348e9f49788a4e5b The no-unpublish-* rules came to handle the "files" field of package.json correctly
Bug Fixes:
no-unpublish-* rules came to handle the "files" field of package.json correctly (#23)peerDependencies (#24)f603c0626d99aea256a3b0b7eb8c644f0759a54f The no-missing-* rules came to handle relative paths to a directory correctly.
Bug Fixes:
no-missing-* rules came to handle relative paths to a directory correctly. (#21)1b7154da018402556223be17704b53754d142f51 The shebang rule came to support Unicode BOM (#16).
Enhancements:
shebang rule came to support Unicode BOM (#16).no-unsupported-features came to support grouping values in the "ignore" option (#18).37eee2fd0e4919eb464ca312d5716b3dcc0dce9c no-unpublished-* rules came to catch paths to outside of the modules (eslint/eslint#4979).
Bug Fixes:
no-unpublished-* rules came to catch paths to outside of the modules (eslint/eslint#4979).8c9d65e68be1d48ae1a3c523acfb0f8871c831d6 no-unsupported-features rule got to cover subclassing and new static properties of built-in global objects
Breaking Changes:
no-unsupported-features rule got to cover subclassing and new static properties of built-in global objects (#10)"ignores" option of no-unsupported-features rule were changed (#10)I'm planning to release a stable version in this month :)
Fixed: shebang rule had been inserting the shebang to wrong location if there is a header comment.
Bug Fixes:
shebang rule had been inserting the shebang to wrong location if there is a header comment.context.getFilename() returns a relative path.No longer no-missing-* rules are checking whether or not import targets are published. So "publish" option was removed.
Breaking Changes:
no-missing-* rules are checking whether or not import targets are published.
So "publish" option was removed. (#3)"convertBinPath" option of shebang rule was removed.
Please use new "convertPath" option.
It's consistent with other rules. (#7)Updates:
no-unpublished-* rules were added.
They were split out from no-missing-* rules. (#3)shebang rule got fixable. (#8)"tryExtensions" option was added to no-missing-* and no-unpublished-*. (#14)
As a result, the behavior that checks files with additional extensions was improved.
Thank you @AprilArcus !"convertPath" for no-unpublished-* and shebang."tryExtensions" for no-missing-* and no-unpublished-*.no-unsupported-features rule is added (#5).
no-unsupported-features rule is added (#5).There was a case that rules fail to find package.json (#1). Plus, I changed cache strategy for package.json.
Bug Fixes:
package.json (#1).package.json.no-missing-require did not work on ESLint 2.0.0-alpha-1 (#2).Added convertBinPath option to node/shebang.
convertBinPath option to node/shebang.no-missing-import - Disallow invalid import and export declarations.
The first beta release.
Three rules are added.
import and export declarations.require()s.Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →