Skip to content

Commit

Permalink
chore: extends from shared base tsconfig (#59776)
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi authored Dec 19, 2023
1 parent 25e0988 commit 9d94372
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 41 deletions.
25 changes: 4 additions & 21 deletions test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
// Make development mode typescript module resolving and jsx parsing correct for all tests
// Make development mode typescript module resolving and jsx parsing correct for all tests.
// We want to apply the compiler options to the testing app, but we don't want to do strict type checking for them.
// e.g. testing app could have import a from '3rd-lib-nextjs-ws-doesnt-have'
{
"compilerOptions": {
"strict": false,
"noEmit": true,
"allowJs": true,
"resolveJsonModule": true,
"jsx": "react-jsx",
"module": "esnext",
"target": "ESNext",
"esModuleInterop": true,
"moduleResolution": "node",
"baseUrl": ".",
"types": ["react", "jest", "node", "trusted-types", "jest-extended"],
"paths": {
"development-sandbox": ["./lib/development-sandbox"],
"next-test-utils": ["./lib/next-test-utils"],
"amp-test-utils": ["./lib/amp-test-utils"],
"next-webdriver": ["./lib/next-webdriver"],
"e2e-utils": ["./lib/e2e-utils"]
}
}
"extends": "../tsconfig.base.json"
}
22 changes: 22 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"compilerOptions": {
"strict": false,
"noEmit": true,
"allowJs": true,
"resolveJsonModule": true,
"jsx": "react-jsx",
"module": "esnext",
"target": "ESNext",
"esModuleInterop": true,
"moduleResolution": "node",
"baseUrl": ".",
"types": ["react", "jest", "node", "trusted-types", "jest-extended"],
"paths": {
"development-sandbox": ["test/lib/development-sandbox"],
"next-test-utils": ["test/lib/next-test-utils"],
"amp-test-utils": ["test/lib/amp-test-utils"],
"next-webdriver": ["test/lib/next-webdriver"],
"e2e-utils": ["test/lib/e2e-utils"]
}
}
}
21 changes: 1 addition & 20 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
{
"compilerOptions": {
"strict": false,
"noEmit": true,
"allowJs": true,
"resolveJsonModule": true,
"jsx": "react-jsx",
"module": "esnext",
"target": "ESNext",
"esModuleInterop": true,
"moduleResolution": "node",
"baseUrl": ".",
"types": ["react", "jest", "node", "trusted-types", "jest-extended"],
"paths": {
"development-sandbox": ["test/lib/development-sandbox"],
"next-test-utils": ["test/lib/next-test-utils"],
"amp-test-utils": ["test/lib/amp-test-utils"],
"next-webdriver": ["test/lib/next-webdriver"],
"e2e-utils": ["test/lib/e2e-utils"]
}
},
"extends": "./tsconfig.base.json",
"include": ["test/**/*.test.ts", "test/**/*.test.tsx"],
"exclude": ["node_modules"]
}

0 comments on commit 9d94372

Please sign in to comment.