sort-vars
UnreleasedConfiguration
rslint.config.ts
Rule Details
This rule requires identifier variables within the same declaration block to be sorted alphabetically. Destructuring declarations are ignored. By default, ordering is case-sensitive.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
With { "ignoreCase": true }, names are compared without case sensitivity:
The rule can automatically reorder declarations when every participating initializer is a literal. It reports without a fix when reordering might change evaluation order.