diff --git a/karma.conf.js b/karma.conf.js index 7158090ba7a..f77387d008a 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -142,6 +142,9 @@ const jasmineConfig = { }, }, }, + exclude: [ + 'scripts/**/*.ts', + ], reports: { html: 'coverage', lcovonly: 'coverage', @@ -150,7 +153,7 @@ const jasmineConfig = { filename: 'coverage.json', }, }, - tsconfig: './tsconfig.json', + tsconfig: './tsconfig-base.json', }, preprocessors: FILES_TO_USE.reduce((obj, file) => { obj[file] = 'karma-typescript'; diff --git a/tsconfig-base.json b/tsconfig-base.json new file mode 100644 index 00000000000..8c3ef42ae48 --- /dev/null +++ b/tsconfig-base.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "declaration": true, + "downlevelIteration": true, + "emitDecoratorMetadata": true, + "esModuleInterop": true, + "experimentalDecorators": true, + "lib": ["es5", "es6", "dom"], + "moduleResolution": "node", + "newLine": "lf", + "noEmitOnError": false, + "noErrorTruncation": true, + "noFallthroughCasesInSwitch": true, + "noStrictGenericChecks": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "preserveConstEnums": true, + "pretty": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "stripInternal": true, + "target": "es5", + "types": [] + } +} diff --git a/tsconfig.json b/tsconfig.json index 781bf96a783..0a5d360ac99 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,29 +1,8 @@ { - "compilerOptions": { - "declaration": true, - "downlevelIteration": true, - "emitDecoratorMetadata": true, - "esModuleInterop": true, - "experimentalDecorators": true, - "lib": ["es5", "es6", "dom"], - "moduleResolution": "node", - "newLine": "lf", - "noEmitOnError": false, - "noErrorTruncation": true, - "noFallthroughCasesInSwitch": true, - "noStrictGenericChecks": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "preserveConstEnums": true, - "pretty": true, - "skipLibCheck": true, - "sourceMap": true, - "strict": true, - "stripInternal": true, - "target": "es5", - "types": [] - }, "exclude": [ - "scripts/**/*.ts" - ] + "packages/**/test/*.ts", + "scripts/**/*.ts", + "testing/**/*.ts" + ], + "extends": "./tsconfig-base.json" }