Skip to content

Commit 69efb66

Browse files
committed
Use shareable tsconfig.json files
1 parent 4ba89c9 commit 69efb66

Some content is hidden

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

61 files changed

+158
-585
lines changed

docs/package.json

+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",

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": "~4.9"
+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": "~4.9"
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": "~4.9"
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": "~4.9"
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": "~4.9"
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

+3-6
Original file line numberDiff line numberDiff line change
@@ -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.0.10",
36+
"@types/react-dom": "^19.0.4",
3637
"@types/react-native-web": "^0.19",
3738
"@vitejs/plugin-react": "^4.2.1",
3839
"eslint": "^9.22.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"
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
11
{
2+
"extends": "@reduxjs/tsconfig/bundler/esnext",
23
"compilerOptions": {
3-
"target": "ESNext",
4-
"useDefineForClassFields": true,
5-
"lib": ["DOM", "DOM.Iterable", "ESNext"],
6-
"allowJs": false,
7-
"skipLibCheck": true,
84
"esModuleInterop": false,
9-
"allowSyntheticDefaultImports": true,
10-
"strict": true,
11-
"module": "ESNext",
12-
"moduleResolution": "bundler",
13-
"resolveJsonModule": true,
14-
"isolatedModules": true,
15-
"noEmit": true,
165
"jsx": "react-jsx",
17-
"types": ["vitest/globals", "react-native-web"]
18-
},
19-
"references": [{ "path": "./tsconfig.node.json" }]
6+
"noEmit": true,
7+
"noImplicitReturns": false,
8+
"outDir": "./dist",
9+
"rootDir": "./",
10+
"types": ["vitest/globals", "vitest/importMeta", "react-native-web"]
11+
}
2012
}
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
{
2+
"extends": "@reduxjs/tsconfig/bundler/esnext",
23
"compilerOptions": {
3-
"composite": true,
4-
"module": "ESNext",
5-
"moduleResolution": "bundler",
6-
"allowSyntheticDefaultImports": true
4+
"composite": true
75
},
86
"include": ["vite.config.ts"]
97
}

examples/query/react/kitchen-sink/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"react-scripts": "5.0.1"
1616
},
1717
"devDependencies": {
18+
"@reduxjs/tsconfig": "workspace:^",
1819
"@testing-library/dom": "^10.4.0",
1920
"@testing-library/jest-dom": "^5.11.5",
2021
"@testing-library/react": "^16.1.0",

0 commit comments

Comments
 (0)