avoid-unnecessary-enum-prefix
Suggests removing unnecessary enum prefixes.
Example
❌ Bad:
enum MyEnum {
alpha(),
beta(),
gama();
const MyEnum();
int someFunction() => switch (this) {
MyEnum.alpha => 0, // LINT
beta => 1,
MyEnum.gama => 2, // LINT
};
}
✅ Good:
enum MyEnum {
alpha(),
beta(),
gama();
const MyEnum();
int someFunction() => switch (this) {
alpha => 0,
beta => 1,
gama => 2,
};
}