Import NextRules
order
Enforces a specific order for import statements
š¼ This rule is enabled in the following configs: recommended, typescript.
š” This rule is automatically fixable by the --fix CLI option.
Enforces a specific order for import statements
Rule Details
This rule aims to prevent issues related to order.
Options
[
{
"type": "object",
"properties": {
"groups": {
"type": "array",
"items": {
"type": "string",
"enum": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index",
"object",
"type",
"side-effect"
]
}
},
"internalPatterns": {
"type": "array",
"items": {
"type": "string"
}
},
"alphabetize": {
"type": "object",
"properties": {
"order": {
"type": "string",
"enum": [
"asc",
"desc",
"ignore"
]
},
"caseInsensitive": {
"type": "boolean"
}
},
"additionalProperties": false
},
"newlinesBetween": {
"type": "string",
"enum": [
"always",
"never",
"ignore"
]
}
},
"additionalProperties": false
}
]Implementation
OWASP Foundation
- Category: A00:2021 - General Security