n/no-hide-core-modules
eslint-plugin-n
import n from "eslint-plugin-n";
export default [
{
plugins: { n },
rules: {
"n/no-hide-core-modules": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
Disallow third-party modules which are hiding core modules
const util = require("util") // ERROR if `util` module exists in node_modules directory.
const path = require("path") // ERROR if `path` module exists in node_modules directory.
// ...const util = require("util") // OK if this is the core module 'util' surely.
const path = require("path") // OK if this is the core module 'path' surely.Examples from the ESLint documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
n/no-hide-core-modules
eslint-plugin-n
import n from "eslint-plugin-n";
export default [
{
plugins: { n },
rules: {
"n/no-hide-core-modules": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Disallow specified modules when loaded by import declarations
Disallow unsupported ECMAScript built-ins on the specified version
Disallow unsupported ECMAScript syntax on the specified version
Disallow unsupported Node.js built-in APIs on the specified version