Skip to content

emptyEnums

Reports empty enum declarations with no members.

✅ This rule is included in the ts logical presets.

An enum with no members serves no purpose. Empty enums cannot be used to represent any values and are typically the result of incomplete implementation or accidental deletion.

enum Status {}
export enum Direction {}
const enum Color {}

This rule is not configurable.

If you are in the middle of implementing an enum and prefer to define the structure before adding members, you may want to temporarily disable this rule. Some codebases use empty enums as placeholder types during development.

Made with ❤️‍🔥 in Boston by Josh Goldberg and contributors.