import { type AstNode } from './util'; /** * Default glob pattern (relative to ESLint `cwd`) used to locate `@dbxModelServiceFactory` source * files. A single layout-agnostic `**\/*.ts` scan finds a consumer's own factory declarations no * matter where they live, rather than assuming the dbx-components monorepo layout * (`components/*\/src/lib/model`, `apps/*\/src/app`) — which a downstream consumer of * `@dereekb/firebase` does not share. The walk prunes `node_modules`/build dirs * (see {@link discoveryGlobExcludeFilter}) and the cheap `text.includes('@'+factoryTag)` pre-filter * in {@link collectFactoryModelTypesFromFile} keeps it from parsing files that carry no tag, so the * broad glob stays fast even in a large consumer repo. In-repo this is a superset of the former * monorepo-specific roots, so the demo app's framework + local factories still resolve. */ export declare const DEFAULT_FACTORY_SEARCH_ROOTS: readonly string[]; /** * Default name of the `@dbxModel` marker tag that triggers the orphan check. */ export declare const DEFAULT_MODEL_MARKER_TAG: string; /** * Default name of the `@dbxModelServiceFactory ` tag the rule cross-references. */ export declare const DEFAULT_FACTORY_TAG: string; /** * Options for the require-service-factory-for-dbx-model rule. */ export interface FirebaseRequireServiceFactoryForDbxModelRuleOptions { /** * Glob patterns (relative to ESLint `cwd`) the rule scans to discover * `@dbxModelServiceFactory ` declarations. Defaults to * {@link DEFAULT_FACTORY_SEARCH_ROOTS}. */ readonly factorySearchRoots?: readonly string[]; /** * Inline factory set used in tests; bypasses filesystem globbing. */ readonly virtualFactoryModelTypes?: readonly string[]; /** * Override the `@dbxModel` marker tag name. Defaults to {@link DEFAULT_MODEL_MARKER_TAG}. */ readonly modelMarkerTag?: string; /** * Override the `@dbxModelServiceFactory` tag name. Defaults to {@link DEFAULT_FACTORY_TAG}. */ readonly factoryTag?: string; /** * Model interface names that are intentionally declared without a matching service factory. * Suppresses the warning for each name. */ readonly ignoreModels?: readonly string[]; } /** * ESLint rule definition for require-service-factory-for-dbx-model. */ export interface FirebaseRequireServiceFactoryForDbxModelRuleDefinition { readonly meta: { readonly type: 'suggestion'; readonly fixable: undefined; readonly docs: { readonly description: string; readonly recommended: boolean; }; readonly messages: Readonly>; readonly schema: readonly object[]; }; create(context: RuleContext): Record void>; } interface RuleContext { readonly options: FirebaseRequireServiceFactoryForDbxModelRuleOptions[]; readonly cwd?: string; readonly sourceCode: AstNode; readonly report: (descriptor: { node: AstNode; messageId: string; data?: Record; }) => void; } /** * ESLint rule that flags every `@dbxModel`-marked interface that has no matching * `@dbxModelServiceFactory ` declaration elsewhere in the workspace. * * The expected `modelType` is derived from the interface name by lowercasing the first * character (matching the `FirestoreModelIdentity.modelType` convention). Models that are * intentionally factory-less (e.g. sub-objects mis-marked as `@dbxModel`) can be silenced via * the `ignoreModels` option. */ export declare const FIREBASE_REQUIRE_SERVICE_FACTORY_FOR_DBX_MODEL_RULE: FirebaseRequireServiceFactoryForDbxModelRuleDefinition; export {};