@rotki/max-dependencies
enforce a maximum number of dependencies per file
- ⭐ The
"extends": "plugin:@rotki/recommended"property in a configuration file enables this rule.
📖 Rule Details
This rule enforces a maximum number of dependencies that can be imported in a single file, helping to prevent files from becoming too complex and encourage better code organization.
⚙️ Options
json
{
"@rotki/max-dependencies": [
"error",
{
"max": 20,
"ignoreTypeImports": false
}
]
}max (number)
The maximum number of dependencies allowed in a single file. Default is 20.
ignoreTypeImports (boolean)
If true, TypeScript type-only imports (imports with import type) are not counted towards the dependency limit. Default is false.
🚀 Version
This rule was introduced in @rotki/eslint-plugin v1.1.0