Skip to content

Commit 89704c3

Browse files
irsootiJounQin
authored andcommitted
feat: prefer Config over FlatConfig when they're equal
1 parent 9e37575 commit 89704c3

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.changeset/lucky-badgers-judge.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-prettier": minor
3+
---
4+
5+
feat(types): prefer `Config` over `FlatConfig` when they're equal

recommended.d.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
import { Linter } from 'eslint';
22

3-
declare const recommendedConfig: Linter.FlatConfig;
3+
// prettier-ignore
4+
type IFEqual<A, B, X = A, Y = B> =
5+
(<G>() => G extends A & G | G ? 1 : 2) extends
6+
(<G>() => G extends B & G | G ? 1 : 2)
7+
? X
8+
: Y;
9+
10+
declare const recommendedConfig: IFEqual<Linter.Config, Linter.FlatConfig>;
411

512
export = recommendedConfig;

0 commit comments

Comments
 (0)