From c1f0dd3c78d9ec30504b98204ef2e68a2366a130 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Sat, 14 Aug 2021 23:03:03 +0530 Subject: chore: Setting some config rules for typescript --- package-lock.json | 6 ++++++ package.json | 1 + tsconfig.settings.json | 19 ++++++++++++++----- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 11c0d0577..0e4572996 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6421,6 +6421,12 @@ "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "dev": true }, + "@tsconfig/node14": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz", + "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==", + "dev": true + }, "@types/babel__core": { "version": "7.1.15", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.15.tgz", diff --git a/package.json b/package.json index ea2d6edc6..164f5601c 100644 --- a/package.json +++ b/package.json @@ -154,6 +154,7 @@ "@babel/register": "7.14.5", "@commitlint/cli": "13.1.0", "@commitlint/config-conventional": "13.1.0", + "@tsconfig/node14": "1.0.1", "@types/color": "3.0.2", "@types/fs-extra": "9.0.12", "@types/lodash": "4.14.172", diff --git a/tsconfig.settings.json b/tsconfig.settings.json index eb2207533..fdf47e653 100644 --- a/tsconfig.settings.json +++ b/tsconfig.settings.json @@ -1,20 +1,29 @@ { + "extends": "@tsconfig/node14/tsconfig.json", "compilerOptions": { "baseUrl": ".", "target": "esnext", - "module": "commonjs", "lib": ["es2015", "es2017", "dom"], "jsx": "react", + "typeRoots": ["node_modules/@types"], "sourceMap": true, - "strict": true, - "noImplicitAny": false, + "noImplicitAny": false, // TODO: Need to switch "allowSyntheticDefaultImports": true, "experimentalDecorators": true, "composite": true, "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, "importHelpers": true, "removeComments": true, - "typeRoots": ["node_modules/@types"] + "allowUnreachableCode": false, + "allowUnusedLabels": false, + "noUnusedLocals": true, + "noUnusedParameters": true, // TODO: Need to switch + "noImplicitReturns": true, + "noImplicitThis": true, + "preserveConstEnums": true, + // "exclude": [ + // "node_modules", + // "**/*.spec.ts" + // ] } } -- cgit v1.2.3-70-g09d2