From c38247abe43dce81ce52719785272b26352fd79c Mon Sep 17 00:00:00 2001 From: Vikrant Gupta Date: Mon, 26 Feb 2024 18:17:34 +0530 Subject: [PATCH] fix: [SIG-528]: precommit typescript check for md files (#4596) --- frontend/scripts/typecheck-staged.sh | 2 +- frontend/tsconfig.json | 22 +++++----------------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/frontend/scripts/typecheck-staged.sh b/frontend/scripts/typecheck-staged.sh index e67cf54a72..7da93c088e 100644 --- a/frontend/scripts/typecheck-staged.sh +++ b/frontend/scripts/typecheck-staged.sh @@ -9,7 +9,7 @@ done # create temporary tsconfig which includes only passed files str="{ \"extends\": \"./tsconfig.json\", - \"include\": [\"src/types/global.d.ts\",\"src/typings/window.ts\", \"src/typings/chartjs-adapter-date-fns.d.ts\", \"src/typings/environment.ts\" ,$files] + \"include\": [\"src/types/global.d.ts\",\"src/typings/window.ts\", \"src/typings/chartjs-adapter-date-fns.d.ts\", \"src/typings/environment.ts\" ,\"src/container/OnboardingContainer/typings.d.ts\",$files] }" echo $str > tsconfig.tmp diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index e22372bac7..e286daf28e 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -11,11 +11,7 @@ "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], + "lib": ["dom", "dom.iterable", "esnext"], "allowSyntheticDefaultImports": true, "noFallthroughCasesInSwitch": true, "moduleResolution": "node", @@ -24,9 +20,7 @@ "noEmit": true, "baseUrl": "./src", "paths": { - "@constants/*": [ - "/container/OnboardingContainer/constants/*" - ] + "@constants/*": ["/container/OnboardingContainer/constants/*"] }, "downlevelIteration": true, "plugins": [ @@ -34,15 +28,9 @@ "name": "typescript-plugin-css-modules" } ], - "types": [ - "node", - "jest" - ], + "types": ["node", "jest"] }, - "exclude": [ - "node_modules", - "./src/container/OnboardingContainer/constants/*.ts" - ], + "exclude": ["node_modules"], "include": [ "./src", "./src/**/*.ts", @@ -63,4 +51,4 @@ "./tests/**.ts", "./**/*.d.ts" ] -} \ No newline at end of file +}