Import NextRules
prefer-modern-api
Suggest modern replacements for deprecated or outdated libraries
š¼ This rule is enabled in the following configs: recommended, typescript.
š” This rule is automatically fixable by the --fix CLI option.
Suggest modern replacements for deprecated or outdated libraries
Rule Details
This rule aims to prevent issues related to prefer-modern-api.
Options
[
{
"type": "object",
"properties": {
"customMappings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"deprecated": {
"type": "string"
},
"modern": {
"type": "string"
},
"reason": {
"type": "string"
},
"difficulty": {
"type": "string",
"enum": [
"easy",
"medium",
"hard"
]
},
"migrationGuide": {
"type": "string"
}
},
"required": [
"deprecated",
"modern",
"reason"
]
}
},
"disableBuiltIn": {
"type": "boolean",
"default": false
}
},
"additionalProperties": false
}
]Implementation
OWASP Foundation
- Category: A00:2021 - General Security