Additional ESLint's rules for Node.js
>=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
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.currentId
async_hooks.triggerId
module._debug
path._makeLong
tls.parseCertString
plugin:node/recommended
preset.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)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)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.