We were using this plugin, but it appeared that Object.keys was considered a 'component' somehow, and raised a warning in a file consisting of solely constants and constant logic. e.g.
// A type-safe way to maintain a list of enum values as a javascript array:
export const TABLE: Record<EnumType, true> = {
key1: true,
key2: true,
key3: true,
}
export const ENUM_VALUES = Object.keys(TABLE) as EnumType[];
Because the first letter of the constant name, ENUM_VALUES is capital, it could be a component. I'm not sure what the parser looks at after that, but apparently Object.keys(...) looks too much like a component, when it most definitely isn't.
We were using this plugin, but it appeared that
Object.keyswas considered a 'component' somehow, and raised a warning in a file consisting of solely constants and constant logic. e.g.Because the first letter of the constant name,
ENUM_VALUESis capital, it could be a component. I'm not sure what the parser looks at after that, but apparentlyObject.keys(...)looks too much like a component, when it most definitely isn't.