import { Linter } from 'eslint'; import { Config as JestConfig } from '@jest/types'; declare global { namespace Lintest { type Rules = Linter.RulesRecord; type Framework = '' | 'next' | 'nuxt'; type LintRules = { general?: T; import?: T; jest?: T; jsxA11y?: T; lintest?: T; n?: T; node?: T; next?: T; nuxt?: T; promise?: T; react?: T; reactHooks?: T; typescript?: T; unicorn?: T; vue?: T; }; // @lintest/rules-* file configure // (globally common configure) type ProviderConfig = { lintRules: LintRules; prettier?: any; disableLintIgnore?: boolean; enableCompatibility?: boolean; }; // lintest.config.{js,json} file configure // (locally common configure) type ConsumerConfig = { provider?: string; framework?: Framework; exportConfig?: { lint?: string; test?: string; prettier?: string; }; cacheLocation?: { lint?: string; test?: string; }; installPlugins?: string[]; installEnvironments?: string[]; overrides?: { lintRules?: LintRules; eslint?: Linter.ConfigOverride[]; jest?: JestConfig.InitialOptions; }; }; // total file configure // (mixed all configure for CLI) type Config = { provider: string; framework: Framework; consumerPath: string; exportConfig: { lint: string; test: string; prettier: string; }; cacheLocation: { lint: string; test: string; }; installPlugins: string[]; installEnvironments: string[]; lintRules: LintRules; eslintOverrides?: Linter.ConfigOverride[]; jestOverrides?: JestConfig.InitialOptions; prettier?: any; disableLintIgnore: boolean; enableCompatibility: boolean; }; } }