diff --git a/index.d.ts b/index.d.ts index bbd18c78e..a2d455566 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,4 +1,6 @@ -import type { Linter, Rule } from 'eslint'; +import type { TSESLint } from '@typescript-eslint/utils'; + +type JestPluginConfigName = 'all' | 'recommended' | 'style'; declare const plugin: { meta: { @@ -7,22 +9,12 @@ declare const plugin: { }; environments: { globals: { - globals: { - [key: string]: boolean; - }; + globals: Record; }; }; - configs: { - all: Linter.LegacyConfig; - recommended: Linter.LegacyConfig; - style: Linter.LegacyConfig; - 'flat/all': Linter.FlatConfig; - 'flat/recommended': Linter.FlatConfig; - 'flat/style': Linter.FlatConfig; - }; - rules: { - [key: string]: Rule.RuleModule; - }; + configs: Record & + Record<`flat/${JestPluginConfigName}`, TSESLint.FlatConfig>; + rules: Record; }; export = plugin;