Breaking changes
- It dropped supports for Node.js 0.x. See also: https://github.com/nodejs/LTS
- It dropped supports for ESLint 2.x.
eslint-plugin-node
4 requires ESLint3.1.0
or later.
Enhancements
- f8a5e0b added new option value of
convertPath
to several rules. This supports excluding files to convert. (#60) - 6172870 added new option
ignoreModuleItems
andignoreGlobalItems
tono-deprecated-api
rule. (#58)
convertPath
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"]
}
]
}]
}
}
ignoreModuleItems and ignoreGlobalItems
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()"]
}]
}
}