From 71226a99e24bfe9a4631800be25014f377a0a788 Mon Sep 17 00:00:00 2001 From: Brion Mario Date: Fri, 20 May 2022 13:54:58 +0530 Subject: [PATCH] Move tsconfig to the base --- configs/common.tsconfig.json | 33 --------------------------------- tsconfig.base.json | 32 ++++++++++++++++++++++++++++++-- tsconfig.base.react.json | 7 +++++++ 3 files changed, 37 insertions(+), 35 deletions(-) delete mode 100644 configs/common.tsconfig.json create mode 100644 tsconfig.base.react.json diff --git a/configs/common.tsconfig.json b/configs/common.tsconfig.json deleted file mode 100644 index 731e13923d9..00000000000 --- a/configs/common.tsconfig.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "compilerOptions": { - "esModuleInterop": true, - "target": "es6", - "module": "esnext", - "moduleResolution": "node", - "declaration": false, - "noImplicitAny": false, - "jsx": "react", - "resolveJsonModule": true, - "sourceMap": true, - "noLib": false, - "skipLibCheck": true, - "suppressImplicitAnyIndexErrors": true, - "types": [ "node" ] - }, - "compileOnSave": false, - "exclude": [ - "node_modules", - "test-configs", - "**/tests/*", - "**/__tests__/*", - "**/__mocks__/*", - "**/*.test.js", - "**/*.test.jsx", - "**/*.test.ts", - "**/*.test.tsx", - "**/*.spec.js", - "**/*.spec.jsx", - "**/*.spec.ts", - "**/*.spec.tsx" - ] -} diff --git a/tsconfig.base.json b/tsconfig.base.json index 4ee3592b01e..b40d8402a6b 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1,3 +1,31 @@ { - "compilerOptions": {} -} \ No newline at end of file + "compilerOptions": { + "declaration": false, + "emitDecoratorMetadata": true, + "esModuleInterop": true, + "experimentalDecorators": true, + "importHelpers": true, + "lib": [ + "ESNext" + ], + "module": "esnext", + "moduleResolution": "node", + "rootDir": ".", + "skipLibCheck": true, + "skipDefaultLibCheck": true, + "sourceMap": true, + "suppressImplicitAnyIndexErrors": true, + "target": "es2015", + "baseUrl": ".", + "paths": { + "@wso2is/react-components": [ + "modules/react-components/src/index.ts" + ] + } + }, + "compileOnSave": false, + "exclude": [ + "node_modules", + "tmp" + ] +} diff --git a/tsconfig.base.react.json b/tsconfig.base.react.json new file mode 100644 index 00000000000..8372643c2e7 --- /dev/null +++ b/tsconfig.base.react.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "jsx": "react", + "lib": [ "ESNext", "DOM", "DOM.Iterable" ], + } +}