lightsoutAlpha

constants

a shared constant filed under `types/` instead of `constants/`

Agent checkadvisory by defaultbasecode

The argument

Constants → common/constants/

Constants are not types — they live in common/constants/ (export const …), never in types/. A const object with its derived union and lookup map lives in constants/ under the object's name (see named-constants.md).

// common/constants/defaultConfig.ts
import type { Config } from '@/path/to/common/types/Config';

export const defaultConfig: Config = { name: 'default' };

A constant may instead carry its own type beside it under one-export-per-file's exception 5 (interface Config + defaultConfig: Config in one constants/ file, named for the value) — use types/ when the type has any other consumer.

The proof

failsrc/common/types/defaultConfig.ts
export const defaultConfig = { name: 'default' };
passsrc/common/constants/defaultConfig.ts
export const defaultConfig = { name: 'default' };

Turn it down

Both lines go in your lightsout.config.json.

"standards-checks": { "constants": "advisory" }
"standards-checks": { "constants": "off" }