UNPKG

@maniascript/mslint

Version:
36 lines (35 loc) 1.55 kB
import { ConfigArray, ConfigArraySymbol } from '@eslint/config-array'; import { Severity, type RuleSettings } from './rule.js'; interface GlobalConfig { cwd: string; patterns: string[]; verbose: boolean; displayStats: boolean; reportUnusedDisableDirective: boolean; reportDisableDirectiveWithoutDescription: boolean; linter: MSLintConfigArray; } interface LinterConfig { rules?: Record<string, Severity | unknown[]>; msApiGame?: string; msApiPath?: string; } declare class MSLintConfigArray extends ConfigArray { [ConfigArraySymbol.preprocessConfig]: (config: unknown) => unknown; } declare function getRuleSeverity(source: unknown): Severity | undefined; declare function getRuleSettings(source: Severity | unknown[]): RuleSettings; declare function validateConfig(unvalidatedGlobalConfig: unknown): GlobalConfig; declare function createConfig({ cwd, patterns, verbose, displayStats, reportUnusedDisableDirective, reportDisableDirectiveWithoutDescription, rules, msApiGame, msApiPath }: { cwd?: string; patterns?: string | string[]; verbose?: boolean; displayStats?: boolean; reportUnusedDisableDirective?: boolean; reportDisableDirectiveWithoutDescription?: boolean; rules?: Record<string, Severity | unknown[]>; msApiGame?: string; msApiPath?: string; }): GlobalConfig; declare function loadConfig(configPath: string): GlobalConfig; export { type GlobalConfig, type LinterConfig, Severity, getRuleSeverity, getRuleSettings, validateConfig, createConfig, loadConfig };