From 2da5c9df61e0bcad80278201b7c83113158db7a2 Mon Sep 17 00:00:00 2001 From: Pierre Rousseau Date: Fri, 20 Sep 2024 09:50:47 +0200 Subject: [PATCH] [REF] tsconfig: use tsconfig.base.json for common settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes odoo/o-spreadsheet#5005 Task: 0 Signed-off-by: RĂ©mi Rahir (rar) --- tsconfig.base.json | 22 ++++++++++++++++++++++ tsconfig.jest.json | 20 ++------------------ tsconfig.json | 20 ++------------------ 3 files changed, 26 insertions(+), 36 deletions(-) create mode 100644 tsconfig.base.json diff --git a/tsconfig.base.json b/tsconfig.base.json new file mode 100644 index 0000000000..a7cf5da0a2 --- /dev/null +++ b/tsconfig.base.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "ES6", + "target": "ESNext", + "preserveConstEnums": true, + "noImplicitThis": true, + "moduleResolution": "node", + "removeComments": false, + "alwaysStrict": true, + "noUnusedLocals": true, + "noUnusedParameters": false, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "strictPropertyInitialization": true, + "strictNullChecks": true, + "esModuleInterop": true, + "allowJs": true, + "sourceMap": true, + "strictBindCallApply": true + }, + "include": ["src"] +} diff --git a/tsconfig.jest.json b/tsconfig.jest.json index 47e7269e38..05fe2c8c11 100644 --- a/tsconfig.jest.json +++ b/tsconfig.jest.json @@ -1,23 +1,7 @@ { + "extends": "./tsconfig.base.json", "compilerOptions": { - "module": "commonjs", - "preserveConstEnums": true, - "noImplicitThis": true, - "moduleResolution": "node", - "removeComments": false, - "target": "ESNext", - "outDir": "dist", - "alwaysStrict": true, - "noUnusedLocals": true, - "noUnusedParameters": false, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "strictPropertyInitialization": true, - "strictNullChecks": true, - "esModuleInterop": true, - "allowJs": true, - "sourceMap": true, - "strictBindCallApply": true + "outDir": "dist" }, "include": ["src", "tests"], "files": ["global.d.ts"] diff --git a/tsconfig.json b/tsconfig.json index 81cdc34018..e8195e9eae 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,24 +1,8 @@ { + "extends": "./tsconfig.base.json", "compilerOptions": { - "module": "ES6", - "preserveConstEnums": true, - "noImplicitThis": true, - "moduleResolution": "node", - "removeComments": false, - "target": "ESNext", "outDir": "build/js", - "alwaysStrict": true, - "noUnusedLocals": true, - "noUnusedParameters": false, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "strictPropertyInitialization": true, - "strictNullChecks": true, - "esModuleInterop": true, - "allowJs": true, - "preserveWatchOutput": true, - "sourceMap": true, - "strictBindCallApply": true + "preserveWatchOutput": true }, "include": ["src"] }