File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ export function createLinter(
45
45
title : string ;
46
46
getEdits : ( ) => ts . FileTextChanges [ ] ;
47
47
} [ ] > ,
48
- {
48
+ refactors : {
49
49
title : string ;
50
50
diagnostic : ts . DiagnosticWithLocation ;
51
51
getEdits : ( ) => ts . FileTextChanges [ ] ;
@@ -130,7 +130,7 @@ export function createLinter(
130
130
file : rulesContext . file ,
131
131
relatedInformation : cacheDiagnostic . relatedInformation ?. map ( info => ( {
132
132
...info ,
133
- file : info . file ? ( syntaxOnlyLanguageService as any ) . getNonBoundSourceFile ( info . file . fileName ) : undefined ,
133
+ file : info . file ? getNonBoundSourceFile ?. ( info . file . fileName ) : undefined ,
134
134
} ) ) ,
135
135
} , [ ] ) ;
136
136
}
@@ -172,6 +172,10 @@ export function createLinter(
172
172
if ( shouldRetry ) {
173
173
// Retry
174
174
shouldEnableTypeAware = true ;
175
+ if ( cache && Object . values ( cache [ 1 ] ) . some ( ( [ hasFix ] ) => hasFix ) ) {
176
+ cache [ 1 ] = { } ;
177
+ cache [ 2 ] = { } ;
178
+ }
175
179
return this . lint ( fileName , cache ) ;
176
180
}
177
181
@@ -189,6 +193,10 @@ export function createLinter(
189
193
if ( ! typeAwareMode ) {
190
194
// Retry
191
195
shouldEnableTypeAware = true ;
196
+ if ( cache && Object . values ( cache [ 1 ] ) . some ( ( [ hasFix ] ) => hasFix ) ) {
197
+ cache [ 1 ] = { } ;
198
+ cache [ 2 ] = { } ;
199
+ }
192
200
return this . lint ( fileName , cache ) ;
193
201
}
194
202
throw error ;
You can’t perform that action at this time.
0 commit comments