UNPKG

eslint-plugin-turbo

Version:
101 lines (96 loc) 2.41 kB
import * as eslint from 'eslint'; import { Rule, ESLint } from 'eslint'; interface EnvironmentConfig { legacyConfig: Array<string>; env: Array<string>; passThroughEnv: Array<string> | null; dotEnv: DotEnvConfig | null; } interface DotEnvConfig { filePaths: Array<string>; hashes: Record<string, string | null>; } interface ProjectKey { global: EnvironmentConfig; globalTasks: Record<string, EnvironmentConfig>; workspaceTasks: Record<string, Record<string, EnvironmentConfig>>; } interface RuleContextWithOptions extends Rule.RuleContext { options: Array<{ cwd?: string; allowList?: Array<string>; }>; } declare const plugin: { meta: { name: string; version: string; }; rules: { [x: string]: { create: (context: RuleContextWithOptions) => eslint.Rule.RuleListener; meta: eslint.Rule.RuleMetaData; }; }; configs: { recommended: { settings: { turbo: { cacheKey: number | ProjectKey; }; }; plugins: string[]; rules: { [x: string]: "error"; }; }; "flat/recommended": { plugins: { readonly turbo: ESLint.Plugin; }; name: string; rules: { [x: string]: "error"; }; settings: { turbo: { cacheKey: number | ProjectKey; }; }; }; }; }; declare const rules: { [x: string]: { create: (context: RuleContextWithOptions) => eslint.Rule.RuleListener; meta: eslint.Rule.RuleMetaData; }; }; declare const configs: { recommended: { settings: { turbo: { cacheKey: number | ProjectKey; }; }; plugins: string[]; rules: { [x: string]: "error"; }; }; "flat/recommended": { plugins: { readonly turbo: ESLint.Plugin; }; name: string; rules: { [x: string]: "error"; }; settings: { turbo: { cacheKey: number | ProjectKey; }; }; }; }; export { ProjectKey, RuleContextWithOptions, configs, plugin as default, rules };