Skip to content

Commit 6c83907

Browse files
author
G r e y
authored
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.
1 parent ec077c6 commit 6c83907

File tree

2 files changed

+9
-21
lines changed

2 files changed

+9
-21
lines changed

site/tsconfig.json

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
11
{
22
"compilerOptions": {
3-
"outDir": "./dist/",
4-
"noImplicitAny": true,
5-
"module": "commonjs",
6-
"target": "es5",
7-
"jsx": "react",
8-
"allowJs": true,
93
"downlevelIteration": true,
104
"esModuleInterop": true,
11-
"resolveJsonModule": true,
5+
"forceConsistentCasingInFileNames": true,
6+
"incremental": true,
127
"isolatedModules": true,
8+
"jsx": "react",
139
"lib": ["dom", "dom.iterable", "esnext"],
10+
"module": "commonjs",
11+
"moduleResolution": "node",
12+
"outDir": "./dist/",
13+
"resolveJsonModule": true,
1414
"skipLibCheck": true,
1515
"strict": true,
16-
"strictNullChecks": true,
17-
"forceConsistentCasingInFileNames": true,
18-
"incremental": true,
19-
"moduleResolution": "node"
16+
"target": "es5"
2017
},
21-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
18+
"include": ["**/*.ts", "**/*.tsx"],
2219
"exclude": ["node_modules", "_jest", "**/*.test.tsx"]
2320
}

site/tsconfig.test.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
11
{
22
"extends": "./tsconfig.json",
3-
"compilerOptions": {
4-
"target": "es5",
5-
"module": "commonjs",
6-
"jsx": "react",
7-
"downlevelIteration": true,
8-
"strict": true,
9-
"strictNullChecks": true,
10-
"esModuleInterop": true
11-
},
123
"exclude": ["node_modules", "_jest"]
134
}

0 commit comments

Comments
 (0)