no-empty-enum
NOTE: this rule is part of the
recommended
rule set.Enable full set in
deno.json
:{ "lint": { "tags": ["recommended"] } }
Enable full set using the Deno CLI:
deno lint --tags=recommended
Disallows the declaration of an empty enum.
An enum with no members serves no purpose. This rule will capture these situations as either unnecessary code or a mistaken empty implementation.
Invalid:
enum Foo {}
Valid:
enum Foo {
ONE = "ONE",
}