Import NextRules
max-dependencies
Enforce the maximum number of dependencies a module can have
š¼ This rule is enabled in the following configs: recommended, typescript.
š” This rule is automatically fixable by the --fix CLI option.
Enforce the maximum number of dependencies a module can have
Rule Details
This rule aims to prevent issues related to max-dependencies.
Options
[
{
"type": "object",
"properties": {
"max": {
"type": "number",
"minimum": 1,
"default": 10,
"description": "Maximum number of dependencies allowed."
},
"ignoreTypeImports": {
"type": "boolean",
"default": true,
"description": "Ignore type-only imports."
},
"ignoreImports": {
"type": "array",
"items": {
"type": "string"
},
"description": "Import sources to ignore."
},
"ignoreFiles": {
"type": "array",
"items": {
"type": "string"
},
"description": "File patterns to ignore."
}
},
"additionalProperties": false
}
]Implementation
OWASP Foundation
- Category: A00:2021 - General Security