From a1164f44685f131179a310175e363d2cc713786c Mon Sep 17 00:00:00 2001 From: G r e y Date: Sun, 13 Mar 2022 20:34:47 +0000 Subject: [PATCH 1/2] 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 --- site/tsconfig.json | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/site/tsconfig.json b/site/tsconfig.json index 16d7c932216be..1989ec0b9efc5 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, + "forceConsistentCasingInFileNames": true, + "incremental": true, "isolatedModules": true, + "jsx": "react", "lib": ["dom", "dom.iterable", "esnext"], + "module": "commonjs", + "moduleResolution": "node", + "outDir": "./dist/", + "resolveJsonModule": true, "skipLibCheck": true, "strict": true, - "strictNullChecks": true, - "forceConsistentCasingInFileNames": true, - "incremental": true, - "moduleResolution": "node" + "target": "es5" }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], + "include": ["**/*.ts", "**/*.tsx"], "exclude": ["node_modules", "_jest", "**/*.test.tsx"] } From 7e195d3271e9d64a832e7fbb8af16139f6206bd9 Mon Sep 17 00:00:00 2001 From: G r e y Date: Sun, 13 Mar 2022 20:53:09 +0000 Subject: [PATCH 2/2] 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.test.json | 9 --------- 1 file changed, 9 deletions(-) diff --git a/site/tsconfig.test.json b/site/tsconfig.test.json index c205a8c2d87f1..2cd6b5bbd2bfd 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"] }