💼 This rule is enabled in the following configs: ✅ recommended
, recommended-react
, recommended-typescript
.
Name | Type |
---|---|
maximumDestructuredVariables |
Integer |
maximumLineLength |
Integer |
This rule disallows destructuring that does not meet certain conditions, aiming to prevent overly complex destructuring patterns and ensure code readability.
This rule checks for:
- Destructuring at a nesting level above 3.
- Destructuring of more than the specified maximum number of variables (default is 2).
- Destructuring on a line exceeding the specified maximum line length (default is 100 characters).
{
"rules": {
"th-rules/no-destructuring": ["error", { "maximumDestructuredVariables": 2, "maximumLineLength": 100 }]
}
}