File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
packages/plugin-typescript/src/lib/nx Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -9,17 +9,14 @@ import {
99} from '@code-pushup/utils' ;
1010import { formatMetaLog } from '../format.js' ;
1111
12+ const TSCONFIG_PATTERN = / ^ t s c o n f i g ( \. .+ ) ? \. j s o n $ / ;
13+ const EXCLUDED_TSCONFIGS = new Set ( [ 'tsconfig.base.json' , 'tsconfig.json' ] ) ;
14+
1215/**
13- * Matches tsconfig.json and tsconfig.*. json, excludes tsconfig.base.json.
16+ * Matches tsconfig.*. json files, excludes tsconfig.json and tsconfig.base.json.
1417 */
1518function isTsconfigFile ( filename : string ) : boolean {
16- if ( filename === 'tsconfig.base.json' ) {
17- return false ;
18- }
19- return (
20- filename === 'tsconfig.json' ||
21- ( filename . startsWith ( 'tsconfig.' ) && filename . endsWith ( '.json' ) )
22- ) ;
19+ return TSCONFIG_PATTERN . test ( filename ) && ! EXCLUDED_TSCONFIGS . has ( filename ) ;
2320}
2421
2522/**
You can’t perform that action at this time.
0 commit comments