/** * @packageDocumentation * Public plugin entrypoint for eslint-plugin-typefest exports and preset wiring. */ import type { ESLint, Linter } from "eslint"; import type { Except } from "type-fest"; import { typefestRules } from "./_internal/rules-registry.js"; import { type TypefestConfigName as InternalTypefestConfigName } from "./_internal/typefest-config-references.js"; /** * Canonical flat-config preset keys exposed through `plugin.configs`. * * @remarks * These names are used by consumers when composing presets in ESLint flat * config arrays. */ export type TypefestConfigName = InternalTypefestConfigName; /** * Flat-config preset shape produced by this plugin. * * @remarks * The `rules` map is required so preset composition can always merge concrete * rule severity entries without additional null checks. */ export type TypefestPresetConfig = Linter.Config & { rules: NonNullable; }; /** Contract for the `configs` object exported by this plugin. */ type TypefestConfigsContract = Record; /** Fully assembled plugin contract used by the runtime default export. */ type TypefestPluginContract = Except & { configs: TypefestConfigsContract; meta: { name: string; namespace: string; version: string; }; processors: NonNullable; rules: NonNullable; }; /** * Fully-qualified ESLint rule id used by this plugin. * * @remarks * Consumers typically use this when building strongly typed rule maps or helper * utilities that require namespaced rule identifiers. */ export type TypefestRuleId = `typefest/${TypefestRuleName}`; /** Unqualified rule name supported by `eslint-plugin-typefest`. */ export type TypefestRuleName = keyof typeof typefestRules; /** Finalized typed view of all exported preset configurations. */ declare const typefestConfigs: TypefestConfigsContract; /** * Runtime type for the plugin's generated config presets. * * @remarks * Mirrors `plugin.configs` and is useful when composing typed preset-aware * tooling in external integrations. */ export type TypefestConfigs = typeof typefestConfigs; /** * Main plugin object exported for ESLint consumption. */ declare const typefestPlugin: TypefestPluginContract; /** * Runtime type for the plugin object exported as default. * * @remarks * Includes resolved `meta`, `rules`, and `configs` contracts after plugin * assembly. */ export type TypefestPlugin = typeof typefestPlugin; /** * Default plugin export consumed by ESLint flat config. */ export default typefestPlugin; //# sourceMappingURL=plugin.d.ts.map