Skip to content

Commit 5b40769

Browse files
committed
Use shareable tsconfig.json files
1 parent 300a389 commit 5b40769

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+196
-592
lines changed

docs/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "docs",
33
"devDependencies": {
44
"@manaflair/redux-batch": "^1.0.0",
5+
"@reduxjs/tsconfig": "workspace:^",
56
"@types/nanoid": "^2.1.0",
67
"@types/react": "^19.0.1",
78
"async-mutex": "^0.3.2",
@@ -12,6 +13,7 @@
1213
"nanoid": "^3.1.23",
1314
"next-redux-wrapper": "^7.0.5",
1415
"redux-persist": "^6.0.0",
15-
"rxjs": "^6.6.2"
16+
"rxjs": "^6.6.2",
17+
"typescript": "^5.8.2"
1618
}
1719
}

docs/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"extends": "@reduxjs/tsconfig/base",
23
"compilerOptions": {
34
"allowSyntheticDefaultImports": true,
45
"esModuleInterop": true,

examples/action-listener/counter/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
]
4242
},
4343
"devDependencies": {
44+
"@reduxjs/tsconfig": "workspace:^",
4445
"jest-watch-typeahead": "^1.1.0"
4546
}
4647
}
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
{
2-
"compilerOptions": {
3-
"target": "es5",
4-
"lib": ["dom", "dom.iterable", "esnext"],
5-
"allowJs": true,
6-
"skipLibCheck": true,
7-
"esModuleInterop": true,
8-
"allowSyntheticDefaultImports": true,
9-
"strict": true,
10-
"forceConsistentCasingInFileNames": true,
11-
"noFallthroughCasesInSwitch": true,
12-
"module": "esnext",
13-
"moduleResolution": "node",
14-
"resolveJsonModule": true,
15-
"isolatedModules": true,
16-
"noEmit": true,
17-
"jsx": "react-jsx"
18-
},
2+
"extends": "@reduxjs/tsconfig/create-react-app",
3+
"compilerOptions": {},
194
"include": ["src"]
205
}

examples/query/react/advanced/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"react-scripts": "5.0.1"
1414
},
1515
"devDependencies": {
16+
"@reduxjs/tsconfig": "workspace:^",
1617
"@types/react": "^19.0.1",
1718
"@types/react-dom": "^19.0.1",
1819
"typescript": "^5.8.2"
+3-18
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
{
2-
"include": ["./src/**/*"],
3-
"compilerOptions": {
4-
"strict": true,
5-
"esModuleInterop": true,
6-
"lib": ["dom", "es2015"],
7-
"jsx": "react-jsx",
8-
"target": "es5",
9-
"allowJs": true,
10-
"skipLibCheck": true,
11-
"allowSyntheticDefaultImports": true,
12-
"forceConsistentCasingInFileNames": true,
13-
"noFallthroughCasesInSwitch": true,
14-
"module": "esnext",
15-
"moduleResolution": "node",
16-
"resolveJsonModule": true,
17-
"isolatedModules": true,
18-
"noEmit": true
19-
}
2+
"extends": "@reduxjs/tsconfig/create-react-app",
3+
"compilerOptions": {},
4+
"include": ["src"]
205
}

examples/query/react/authentication-with-extrareducers/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"react-scripts": "5.0.1"
2121
},
2222
"devDependencies": {
23+
"@reduxjs/tsconfig": "workspace:^",
2324
"@types/react": "^19.0.1",
2425
"@types/react-dom": "^19.0.1",
2526
"typescript": "^5.8.2"
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
{
2-
"include": ["./src/**/*"],
3-
"compilerOptions": {
4-
"strict": true,
5-
"esModuleInterop": true,
6-
"lib": ["dom", "es2015"],
7-
"jsx": "react-jsx",
8-
"target": "es5",
9-
"allowJs": true,
10-
"skipLibCheck": true,
11-
"allowSyntheticDefaultImports": true,
12-
"forceConsistentCasingInFileNames": true,
13-
"noFallthroughCasesInSwitch": true,
14-
"module": "esnext",
15-
"moduleResolution": "node",
16-
"resolveJsonModule": true,
17-
"isolatedModules": true,
18-
"noEmit": true
19-
}
2+
"extends": "@reduxjs/tsconfig/create-react-app",
3+
"compilerOptions": {},
4+
"include": ["src"]
205
}

examples/query/react/authentication/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"react-scripts": "5.0.1"
2121
},
2222
"devDependencies": {
23+
"@reduxjs/tsconfig": "workspace:^",
2324
"@types/react": "^19.0.1",
2425
"@types/react-dom": "^19.0.1",
2526
"typescript": "^5.8.2"
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
{
2-
"include": ["./src/**/*"],
3-
"compilerOptions": {
4-
"strict": true,
5-
"esModuleInterop": true,
6-
"lib": ["dom", "es2015"],
7-
"jsx": "react-jsx",
8-
"target": "es5",
9-
"allowJs": true,
10-
"skipLibCheck": true,
11-
"allowSyntheticDefaultImports": true,
12-
"forceConsistentCasingInFileNames": true,
13-
"noFallthroughCasesInSwitch": true,
14-
"module": "esnext",
15-
"moduleResolution": "node",
16-
"resolveJsonModule": true,
17-
"isolatedModules": true,
18-
"noEmit": true
19-
}
2+
"extends": "@reduxjs/tsconfig/create-react-app",
3+
"compilerOptions": {},
4+
"include": ["src"]
205
}

examples/query/react/basic/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"react-scripts": "5.0.1"
1414
},
1515
"devDependencies": {
16+
"@reduxjs/tsconfig": "workspace:^",
1617
"@testing-library/dom": "^10.4.0",
1718
"@testing-library/react": "^16.1.0",
1819
"@types/jest": "^26.0.23",
+3-18
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
{
2-
"include": ["./src/**/*"],
3-
"compilerOptions": {
4-
"strict": true,
5-
"esModuleInterop": true,
6-
"lib": ["dom", "es2015"],
7-
"jsx": "react-jsx",
8-
"target": "es5",
9-
"allowJs": true,
10-
"skipLibCheck": true,
11-
"allowSyntheticDefaultImports": true,
12-
"forceConsistentCasingInFileNames": true,
13-
"noFallthroughCasesInSwitch": true,
14-
"module": "esnext",
15-
"moduleResolution": "node",
16-
"resolveJsonModule": true,
17-
"isolatedModules": true,
18-
"noEmit": true
19-
}
2+
"extends": "@reduxjs/tsconfig/create-react-app",
3+
"compilerOptions": {},
4+
"include": ["src"]
205
}

examples/query/react/conditional-fetching/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"react-scripts": "5.0.1"
1414
},
1515
"devDependencies": {
16+
"@reduxjs/tsconfig": "workspace:^",
1617
"@types/react": "^19.0.1",
1718
"@types/react-dom": "^19.0.1",
1819
"typescript": "^5.8.2"
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
{
2-
"include": ["./src/**/*"],
3-
"compilerOptions": {
4-
"strict": true,
5-
"esModuleInterop": true,
6-
"lib": ["dom", "es2015"],
7-
"jsx": "react-jsx",
8-
"target": "es5",
9-
"allowJs": true,
10-
"skipLibCheck": true,
11-
"allowSyntheticDefaultImports": true,
12-
"forceConsistentCasingInFileNames": true,
13-
"noFallthroughCasesInSwitch": true,
14-
"module": "esnext",
15-
"moduleResolution": "node",
16-
"resolveJsonModule": true,
17-
"isolatedModules": true,
18-
"noEmit": true
19-
}
2+
"extends": "@reduxjs/tsconfig/create-react-app",
3+
"compilerOptions": {},
4+
"include": ["src"]
205
}

examples/query/react/deduping-queries/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"react-scripts": "5.0.1"
1414
},
1515
"devDependencies": {
16+
"@reduxjs/tsconfig": "workspace:^",
1617
"@types/react": "^19.0.1",
1718
"@types/react-dom": "^19.0.1",
1819
"typescript": "^5.8.2"
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
{
2-
"include": ["./src/**/*"],
3-
"compilerOptions": {
4-
"strict": true,
5-
"esModuleInterop": true,
6-
"lib": ["dom", "es2015"],
7-
"jsx": "react-jsx",
8-
"target": "es5",
9-
"allowJs": true,
10-
"skipLibCheck": true,
11-
"allowSyntheticDefaultImports": true,
12-
"forceConsistentCasingInFileNames": true,
13-
"noFallthroughCasesInSwitch": true,
14-
"module": "esnext",
15-
"moduleResolution": "node",
16-
"resolveJsonModule": true,
17-
"isolatedModules": true,
18-
"noEmit": true
19-
}
2+
"extends": "@reduxjs/tsconfig/create-react-app",
3+
"compilerOptions": {},
4+
"include": ["src"]
205
}

examples/query/react/graphql-codegen/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"@graphql-codegen/typescript-operations": "^1.18.0",
3434
"@graphql-codegen/typescript-rtk-query": "^1.1.0",
3535
"@graphql-typed-document-node/core": "^3.1.0",
36+
"@reduxjs/tsconfig": "workspace:^",
3637
"@types/faker": "^5.5.5",
3738
"@types/react": "^19.0.1",
3839
"@types/react-dom": "^19.0.1",
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,5 @@
11
{
2-
"include": ["./src/**/*"],
3-
"compilerOptions": {
4-
"strict": true,
5-
"esModuleInterop": true,
6-
"lib": ["dom", "es2015"],
7-
"jsx": "react-jsx",
8-
"target": "es5",
9-
"allowJs": true,
10-
"skipLibCheck": true,
11-
"allowSyntheticDefaultImports": true,
12-
"forceConsistentCasingInFileNames": true,
13-
"noFallthroughCasesInSwitch": true,
14-
"module": "esnext",
15-
"moduleResolution": "node",
16-
"resolveJsonModule": true,
17-
"isolatedModules": true,
18-
"noEmit": true,
19-
"baseUrl": "src"
20-
}
2+
"extends": "@reduxjs/tsconfig/create-react-app",
3+
"compilerOptions": {},
4+
"include": ["src"]
215
}

examples/query/react/graphql/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"react-scripts": "5.0.1"
2626
},
2727
"devDependencies": {
28+
"@reduxjs/tsconfig": "workspace:^",
2829
"@types/faker": "^5.5.5",
2930
"@types/react": "^19.0.1",
3031
"@types/react-dom": "^19.0.1",
+3-18
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
{
2-
"include": ["./src/**/*"],
3-
"compilerOptions": {
4-
"strict": true,
5-
"esModuleInterop": true,
6-
"lib": ["dom", "es2015"],
7-
"jsx": "react-jsx",
8-
"target": "es5",
9-
"allowJs": true,
10-
"skipLibCheck": true,
11-
"allowSyntheticDefaultImports": true,
12-
"forceConsistentCasingInFileNames": true,
13-
"noFallthroughCasesInSwitch": true,
14-
"module": "esnext",
15-
"moduleResolution": "node",
16-
"resolveJsonModule": true,
17-
"isolatedModules": true,
18-
"noEmit": true
19-
}
2+
"extends": "@reduxjs/tsconfig/create-react-app",
3+
"compilerOptions": {},
4+
"include": ["src"]
205
}

examples/query/react/infinite-queries/package.json

+5-8
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
"scripts": {
77
"dev": "vite",
88
"start": "vite",
9-
"build": "tsc && vite build",
9+
"build": "tsc -b && vite build",
1010
"preview": "vite preview",
1111
"test": "vitest run",
1212
"format-check": "yarn run -T format-check",
1313
"format": "yarn run -T format",
1414
"lint-fix": "yarn run -T lint-fix",
1515
"lint": "yarn run -T lint",
16-
"type-check": "tsc --noEmit"
16+
"type-check": "tsc -b --noEmit"
1717
},
1818
"dependencies": {
1919
"@reduxjs/toolkit": "https://pkg.csb.dev/reduxjs/redux-toolkit/commit/2aca4f24/@reduxjs/toolkit/_pkg.tgz",
@@ -27,12 +27,13 @@
2727
"devDependencies": {
2828
"@reduxjs/eslint-config": "workspace:^",
2929
"@reduxjs/prettier-config": "workspace:^",
30+
"@reduxjs/tsconfig": "workspace:^",
3031
"@testing-library/dom": "^9.3.4",
3132
"@testing-library/jest-dom": "^6.2.0",
3233
"@testing-library/react": "^14.1.2",
3334
"@testing-library/user-event": "^14.5.2",
34-
"@types/react": "18.3.12",
35-
"@types/react-dom": "18.3.1",
35+
"@types/react": "^19.1.0",
36+
"@types/react-dom": "^19.1.2",
3637
"@types/react-native-web": "^0.19",
3738
"@vitejs/plugin-react": "^4.2.1",
3839
"eslint": "^9.24.0",
@@ -44,10 +45,6 @@
4445
"vite": "^5.0.0",
4546
"vitest": "^1.2.0"
4647
},
47-
"resolutions": {
48-
"@types/react": "18.3.12",
49-
"@types/react-dom": "18.3.1"
50-
},
5148
"msw": {
5249
"workerDirectory": [
5350
"public"

examples/query/react/infinite-queries/src/mocks/handlers.ts

+2
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ export const handlers = [
149149
return HttpResponse.json({ message: error.message }, { status: 400 })
150150
}
151151
}
152+
153+
return undefined
152154
},
153155
),
154156
http.get(
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"extends": "@reduxjs/tsconfig/bundler/esnext",
3+
"compilerOptions": {
4+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
5+
"target": "ES2020",
6+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
7+
8+
/* Bundler mode */
9+
"allowImportingTsExtensions": true,
10+
"moduleDetection": "force",
11+
"noEmit": true,
12+
"jsx": "react-jsx",
13+
14+
/* Linting */
15+
"noUncheckedSideEffectImports": true
16+
},
17+
"include": ["src"]
18+
}

0 commit comments

Comments
 (0)