-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels