Import NextRules
no-legacy-imports
Detect imports from deprecated internal paths and suggest alternatives
š¼ This rule is enabled in the following configs: recommended, typescript.
š” This rule is automatically fixable by the --fix CLI option.
Detect imports from deprecated internal paths and suggest alternatives
Rule Details
This rule aims to prevent issues related to legacy-imports.
Options
[
{
"type": "object",
"properties": {
"mappings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"deprecated": {
"type": "string"
},
"replacement": {
"type": "string"
},
"reason": {
"type": "string"
},
"since": {
"type": "string"
},
"deadline": {
"type": "string"
}
},
"required": [
"deprecated",
"replacement"
]
}
},
"severity": {
"type": "string",
"enum": [
"warn",
"error"
],
"default": "warn"
}
},
"required": [
"mappings"
],
"additionalProperties": false
}
]Implementation
OWASP Foundation
- Category: A00:2021 - General Security