Import NextRules
no-full-package-import
Disallow full package imports from known large packages that prevent tree-shaking
š¼ This rule is enabled in the following configs: recommended, typescript.
š” This rule is automatically fixable by the --fix CLI option.
Disallow full package imports from known large packages that prevent tree-shaking
Rule Details
This rule aims to prevent issues related to full-package-import.
Options
[
{
"type": "object",
"properties": {
"blockedPackages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"suggestion": {
"type": "string"
},
"example": {
"type": "string"
}
},
"required": [
"name",
"suggestion"
]
},
"default": [],
"description": "Packages to block full imports from"
}
},
"additionalProperties": false
}
]Implementation
OWASP Foundation
- Category: A00:2021 - General Security