Skip to content

Commit

Permalink
Update: deprecate no-hide-core-modules (fixes #69)
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticatea committed Mar 6, 2017
1 parent 8be4d96 commit 61fcbb0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ Additional ESLint's rules for Node.js
|:------:|:--------:|:-----------------------------------------------------------------|:------------|
| | | [exports-style](docs/rules/exports-style.md) | Enforce either `module.exports` or `exports`.
| :star: | | [no-deprecated-api](docs/rules/no-deprecated-api.md) | Disallow deprecated API.
| | | [no-hide-core-modules](docs/rules/no-hide-core-modules.md) | Disallow third-party modules which are hiding core modules.
| | | [no-missing-import](docs/rules/no-missing-import.md) | Disallow `import` declarations for files that don't exist. :warning:
| :star: | | [no-missing-require](docs/rules/no-missing-require.md) | Disallow `require()`s for files that don't exist.
| :star: | | [no-unpublished-bin](docs/rules/no-unpublished-bin.md) | Disallow `bin` files that npm ignores.
Expand Down
2 changes: 2 additions & 0 deletions docs/rules/no-hide-core-modules.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Disallow third-party modules which are hiding core modules (node/no-hide-core-modules)

**:warning: This is deprecated since v4.2.0.** This rule was based on an invalid assumption. See also [#69](https://github.com/mysticatea/eslint-plugin-node/issues/69).

If you have dependencies which have the same name as core modules, your module would use the third-party modules instead of core modules.
Especially, if you depends 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.
Expand Down
5 changes: 5 additions & 0 deletions lib/rules/no-hide-core-modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
* @author Toru Nagashima
* @copyright 2016 Toru Nagashima. All rights reserved.
* See LICENSE file in root directory for full license.
*
* @deprecated since v4.2.0
* This rule was based on an invalid assumption.
* No meaning.
*/
"use strict"

Expand Down Expand Up @@ -104,6 +108,7 @@ module.exports = {
category: "Possible Errors",
recommended: false,
},
deprecated: true,
fixable: false,
schema: [
{
Expand Down
4 changes: 4 additions & 0 deletions tests/lib/rules/no-hide-core-modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
* @author Toru Nagashima
* @copyright 2016 Toru Nagashima. All rights reserved.
* See LICENSE file in root directory for full license.
*
* @deprecated since v4.2.0
* This rule was based on an invalid assumption.
* No meaning.
*/
"use strict"

Expand Down

0 comments on commit 61fcbb0

Please sign in to comment.