File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 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 {
189189 return ;
190190 }
191191
192- const TemplateLinterKlass = await this . getLinter ( project ) ;
192+ const TemplateLinterKlass = await this . linterForProject ( project ) ;
193193
194194 if ( ! TemplateLinterKlass ) {
195195 return ;
@@ -275,10 +275,18 @@ export default class TemplateLinter {
275275 }
276276 // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
277277 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+ }
279287 }
280288 // 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 > {
282290 if ( this . _linterCache . has ( project ) ) {
283291 return this . _linterCache . get ( project ) ;
284292 }
You can’t perform that action at this time.
0 commit comments