Skip to content

Commit f022fb1

Browse files
authored
fix(experimental-utils): require fix in suggestions (typescript-eslint#3949)
1 parent edaa3c1 commit f022fb1

File tree

1 file changed

+6
-1
lines changed
  • packages/experimental-utils/src/ts-eslint

1 file changed

+6
-1
lines changed

packages/experimental-utils/src/ts-eslint/Rule.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,16 @@ interface RuleFixer {
112112
replaceTextRange(range: AST.Range, text: string): RuleFix;
113113
}
114114

115+
interface SuggestionReportDescriptor<TMessageIds extends string>
116+
extends Omit<ReportDescriptorBase<TMessageIds>, 'fix'> {
117+
readonly fix: ReportFixFunction;
118+
}
119+
115120
type ReportFixFunction = (
116121
fixer: RuleFixer,
117122
) => null | RuleFix | readonly RuleFix[] | IterableIterator<RuleFix>;
118123
type ReportSuggestionArray<TMessageIds extends string> =
119-
ReportDescriptorBase<TMessageIds>[];
124+
SuggestionReportDescriptor<TMessageIds>[];
120125

121126
interface ReportDescriptorBase<TMessageIds extends string> {
122127
/**

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy