This rule forbids const enum
declarations. Programs that use const enum
declarations cannot be compiled using without fully checking the program's types. That means they are not compatible with TypeScript's transpileModule
function nor can they be transpiled with Babel.
This rule accepts a single option which is an object with an allowLocal
property that determines whether local - i.e. non-exported - const enums are allowed. By default, they are not.
{
"etc/no-const-enum": [
"error",
{ "allowLocal": true }
]
}