import type { AnalyzerConfig } from "./config"; import type { RulePlugin } from "./core/types"; export const PLUGIN_API_VERSION = 1; export interface SlopScanPlugin { meta: { name: string; version?: string; namespace?: string; apiVersion: typeof PLUGIN_API_VERSION; }; rules?: Record; configs?: Record>; } export type PluginReference = SlopScanPlugin | string; export interface LoadedPlugin { namespace: string; plugin: SlopScanPlugin; source: string; } export interface ConfigFile extends Partial { extends?: string[]; plugins?: Record; } /** Preserves type inference for plugin definitions. */ export function definePlugin(plugin: T): T { return plugin; } /** Preserves type inference for config definitions. */ export function defineConfig(config: T): T { return config; }