Import NextRules
no-nodejs-modules
Prevents Node.js builtin imports
š¼ This rule is enabled in the following configs: recommended, typescript.
š” This rule is automatically fixable by the --fix CLI option.
Prevents Node.js builtin imports
Rule Details
This rule aims to prevent issues related to nodejs-modules.
Options
[
{
"type": "object",
"properties": {
"allow": {
"type": "array",
"items": {
"type": "string"
},
"description": "Node.js builtins to allow."
},
"additionalBuiltins": {
"type": "array",
"items": {
"type": "string"
},
"description": "Additional modules to treat as builtins."
},
"suggestAlternatives": {
"type": "boolean",
"default": true,
"description": "Suggest browser-compatible alternatives."
}
},
"additionalProperties": false
}
]Implementation
OWASP Foundation
- Category: A00:2021 - General Security