Skip to content

Commit 6fe0c90

Browse files
irsootiJounQin
andauthored
feat: prefer Config over FlatConfig when they're equal (#674)
Co-authored-by: JounQin <[email protected]>
1 parent 9e37575 commit 6fe0c90

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.changeset/lucky-badgers-judge.md

+5
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

+8-1
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)