Skip to content

Commit 3903337

Browse files
committed
add LegacyConfig type
1 parent ba12b28 commit 3903337

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

types/eslint/v8/eslint-tests.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,6 +1072,9 @@ const eslintConfig3: Linter.Config<ESLintRules & TSLinterRules> = eslintConfig2;
10721072
eslintConfig3.rules; // $ExpectType Partial<ESLintRules & TSLinterRules> | undefined
10731073
eslintConfig3.overrides?.[1].rules; // $ExpectType Partial<ESLintRules & TSLinterRules> | undefined
10741074

1075+
let legacyConfig: Linter.LegacyConfig = eslintConfig;
1076+
eslintConfig = legacyConfig;
1077+
10751078
// #endregion
10761079

10771080
// #region RuleTester

types/eslint/v8/index.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,6 +1053,11 @@ export namespace Linter {
10531053
root?: boolean | undefined;
10541054
}
10551055

1056+
/**
1057+
* An alias for `Config` for interoperability with `@types/eslint@9`.
1058+
*/
1059+
type LegacyConfig = Config;
1060+
10561061
/**
10571062
* Parser options.
10581063
*

0 commit comments

Comments
 (0)