From 6c83907b1b36b6738991761212587d17d0e451b8 Mon Sep 17 00:00:00 2001 From: G r e y Date: Sun, 13 Mar 2022 19:54:35 -0400 Subject: [PATCH] refactor(site): match v1 tsconfig; simplify tsconfig.test.json (#426) * refactor(site): match v1 tsconfig Summary of changes: * ordered configurations for ease of readability * allowJs removed -> not needed after Next.js * noImplicitAny removed -> this is set to true by strict * strictNullChecks removed -> this is set to true by strict * removed lingering next-env.d.ts in include * refactor(site): simplify tsconfig.test.json Because that the base tsconfig was simplified when changing from Next.js, this one now duplicates most of it. I still believe having a separate tsconfig is a good idea for the purposes of separating tests from source code. It especially can make it easier for eslint and jest performance. --- site/tsconfig.json | 25 +++++++++++-------------- site/tsconfig.test.json | 9 --------- 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/site/tsconfig.json b/site/tsconfig.json index 16d7c93221..1989ec0b9e 100644 --- a/site/tsconfig.json +++ b/site/tsconfig.json @@ -1,23 +1,20 @@ { "compilerOptions": { - "outDir": "./dist/", - "noImplicitAny": true, - "module": "commonjs", - "target": "es5", - "jsx": "react", - "allowJs": true, "downlevelIteration": true, "esModuleInterop": true, - "resolveJsonModule": true, - "isolatedModules": true, - "lib": ["dom", "dom.iterable", "esnext"], - "skipLibCheck": true, - "strict": true, - "strictNullChecks": true, "forceConsistentCasingInFileNames": true, "incremental": true, - "moduleResolution": "node" + "isolatedModules": true, + "jsx": "react", + "lib": ["dom", "dom.iterable", "esnext"], + "module": "commonjs", + "moduleResolution": "node", + "outDir": "./dist/", + "resolveJsonModule": true, + "skipLibCheck": true, + "strict": true, + "target": "es5" }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], + "include": ["**/*.ts", "**/*.tsx"], "exclude": ["node_modules", "_jest", "**/*.test.tsx"] } diff --git a/site/tsconfig.test.json b/site/tsconfig.test.json index c205a8c2d8..2cd6b5bbd2 100644 --- a/site/tsconfig.test.json +++ b/site/tsconfig.test.json @@ -1,13 +1,4 @@ { "extends": "./tsconfig.json", - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "jsx": "react", - "downlevelIteration": true, - "strict": true, - "strictNullChecks": true, - "esModuleInterop": true - }, "exclude": ["node_modules", "_jest"] }