Releases: mysticatea/eslint-plugin-node
Releases · mysticatea/eslint-plugin-node
v4.2.0
Deprecate a rule
- 61fcbb0 deprecated no-hide-core-modules rule. This rule was based on an invalid assumption. Third-party modules never hide core modules. (#69)
Bug fixes
- 8be4d96 made no-missing-require and no-missing-import rules checking file paths with case sensitive.
- 4cc0e3f removed the exception about third-party modules which have the same name as core modules from no-deprecated-api rule. Third-party modules never hide core modules.
v4.1.0
New rules
- c289f18 added no-hide-core-modules rule.
 This rule disallowsrequire()expressions andimportdeclarations if those import a third-party module which has the same name as core modules. Especially, if you depend on such modules indirectly andnpmflattens dependencies, you can depend on such third-party modules before as you know it. This might cause unintentional behaviors.
Enhancements
- 91ebdf4 added supports for async functions into no-unsupported-features rule since Node.js 7.6 supported it.
Bug fixes
- 17c8ae0 fixed the behavior of no-deprecated-api rule about indirect dependencies. The no-deprecated-api rule has ignored deprecated APIs if a code imports the third-party module which has same name as a core module. However, I found it can cause confusing because of indirect dependencies and flatting dependencies.
 Now, The no-deprecated-api rule does not ignore deprecated APIs even if a code imports the third-party module which has same name as a core module except it's in yourpackage.jsonexplicitly.
 If you want to revive old behavior, please setignoreIndirectDependencies: trueoption.
v4.0.1
v4.0.0
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-node4 requires ESLint3.1.0or later.
Enhancements
- f8a5e0b added new option value of convertPathto several rules. This supports excluding files to convert. (#60)
- 6172870 added new option ignoreModuleItemsandignoreGlobalItemstono-deprecated-apirule. (#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()"]
        }]
    }
}v3.0.5
v3.0.4
v3.0.3
v3.0.2
No change.
I had published 2.1.4 to the latest tag.
This release recovers the releasing mistake.
v3.0.1
Bug Fixes
- 610b905 fixed no-deprecated-apicrashing on assignments to undefined variables. (#55)
 Thank you, @not-an-aardvark !