Skip to main content

enum-constants-ordering

added in: 1.8.0
🛠

Ensures consistent alphabetical order of Enum constants.

Example

❌ Bad:

enum SomeEnum {
second,
first, // LINT
}

✅ Good:

enum SomeEnum {
first,
second,
}