n/no-exports-assign
eslint-plugin-n
No autofixRecommended
eslint.config.js
import n from "eslint-plugin-n";
export default [
{
plugins: { n },
rules: {
"n/no-exports-assign": "error",
},
},
];exports = {}module.exports.foo = 1
exports.bar = 2
module.exports = {}
// allows `exports = {}` if along with `module.exports =`
module.exports = exports = {}
exports = module.exports = {}Examples from the ESLint documentation.
n/no-exports-assign
eslint-plugin-n
import n from "eslint-plugin-n";
export default [
{
plugins: { n },
rules: {
"n/no-exports-assign": "error",
},
},
];node/no-exports-assign
node plugin · suspicious
{
"plugins": [
"node"
],
"rules": {
"node/no-exports-assign": "error"
}
}Biome does not have this rule.
Require that process.exit() expressions use the same code path as throw
Disallow string concatenation with __dirname, __filename, and import.meta paths
Disallow import declarations which import extraneous modules