File tree 1 file changed +11
-3
lines changed 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ export default class TemplateLinter {
189
189
return ;
190
190
}
191
191
192
- const TemplateLinterKlass = await this . getLinter ( project ) ;
192
+ const TemplateLinterKlass = await this . linterForProject ( project ) ;
193
193
194
194
if ( ! TemplateLinterKlass ) {
195
195
return ;
@@ -275,10 +275,18 @@ export default class TemplateLinter {
275
275
}
276
276
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
277
277
public async linterForProject ( project : Project ) {
278
- return await this . getLinter ( project ) ;
278
+ const maybeLinter = await this . getLinter ( project ) ;
279
+
280
+ if ( ! maybeLinter ) {
281
+ return ;
282
+ } else if ( 'default' in maybeLinter ) {
283
+ return maybeLinter . default ;
284
+ } else {
285
+ return maybeLinter ;
286
+ }
279
287
}
280
288
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
281
- private async getLinter ( project : Project ) : Promise < typeof Linter | undefined > {
289
+ private async getLinter ( project : Project ) : Promise < typeof Linter | { default : typeof Linter } | undefined > {
282
290
if ( this . _linterCache . has ( project ) ) {
283
291
return this . _linterCache . get ( project ) ;
284
292
}
You can’t perform that action at this time.
0 commit comments