interface AstNode { readonly type: string; [key: string]: any; } /** * Options accepted by the require-constant-naming rule. */ export interface UtilRequireConstantNamingRuleOptions { /** * JSDoc tag that exempts a matching const from the rule. * Defaults to `@dbxAllowConstantName`. */ readonly exemptJsdocTag?: string; /** * Type annotation identifier names whose `export const X: T = {...}` declarations are exempt * from the rule. * * When the declarator's type annotation is a `TSTypeReference` whose identifier (or leftmost * segment of a `TSQualifiedName`) is in this list, the constant is skipped regardless of casing. * * Defaults to {@link DEFAULT_EXEMPT_TYPE_ANNOTATIONS}. Pass an empty array to opt out of the * defaults entirely (strict mode); pass a non-empty array to replace the defaults. */ readonly exemptTypeAnnotations?: readonly string[]; } /** * ESLint rule definition for require-constant-naming. */ export interface UtilRequireConstantNamingRuleDefinition { readonly meta: { readonly type: 'suggestion'; readonly fixable: undefined; readonly docs: { readonly description: string; readonly recommended: boolean; }; readonly messages: { readonly functionConstantShouldBeCamelCase: string; readonly valueConstantShouldBeUpperSnakeCase: string; }; readonly schema: readonly object[]; }; create(context: { options: UtilRequireConstantNamingRuleOptions[]; report: (descriptor: { node: AstNode; messageId: string; data?: Record; }) => void; sourceCode: AstNode; }): Record void>; } /** * ESLint rule that enforces the dbx-components Constant Naming convention on exported top-level * `const` declarations: * * - Function-typed constants (arrow/function expression initializers, or `: TSFunctionType` * annotations) may be camelCase (the usual callable casing) or UPPER_SNAKE_CASE (when the binding * is treated as a constant-shaped function reference, e.g. a default factory or registered hook). * - Plain-value constants (string/number/boolean/array/object/`new`/template-literal initializers) * must be UPPER_SNAKE_CASE. PascalCase is also accepted for class- and enum-like singletons. * * The rule deliberately skips ambiguous initializers (CallExpressions, identifier aliases, member * accesses) because we can't tell without type information whether the binding will end up callable. * Use the exempt JSDoc tag (default `@dbxAllowConstantName`) to silence the rule on a specific * declaration when the heuristics get it wrong. * * Framework-prescribed singleton types (UIRouter's `Ng2StateDeclaration`, Angular's * `ApplicationConfig`, `Routes`, etc.) are exempt by default via the `exemptTypeAnnotations` option: * any `export const X: T = {...}` whose type annotation is a `TSTypeReference` to one of those * names is skipped regardless of casing. Pass `exemptTypeAnnotations: []` to opt out of the * defaults, or pass a non-empty array to replace the default allowlist with a project-specific set. * * Not auto-fixable: renaming an exported binding has cross-file impact that an autofix can't safely * propagate. * * @see `dbx__note__typescript-programming` → Constant Naming. */ export declare const UTIL_REQUIRE_CONSTANT_NAMING_RULE: UtilRequireConstantNamingRuleDefinition; export {};