Skip to content

Commit 5043212

Browse files
authoredMar 8, 2024
chore: Use tsconfig paths to improve local DX (#51)
* chore: Use tsconfig paths to improve local DX * Add paths to legacy tsconfig files * Update root tsconfig * Wrong path oops
1 parent 9e04a5e commit 5043212

11 files changed

+94
-39
lines changed
 

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"namespace": "@tanstack",
3939
"devDependencies": {
4040
"@solidjs/testing-library": "^0.8.5",
41-
"@tanstack/config": "^0.4.2",
41+
"@tanstack/config": "^0.6.0",
4242
"@testing-library/jest-dom": "^6.1.5",
4343
"@testing-library/react": "^14.1.2",
4444
"@testing-library/user-event": "^14.4.3",

‎packages/angular-store/tsconfig.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
"compilerOptions": {
44
"moduleResolution": "Bundler",
55
"experimentalDecorators": true,
6-
"types": ["vitest/globals"]
6+
"types": ["vitest/globals"],
7+
"paths": {
8+
"@tanstack/store": ["../store/src"]
9+
}
710
},
811
"include": ["src/**/*.ts", "src/**/*.tsx", ".eslintrc.cjs", "vite.config.ts"]
912
}

‎packages/angular-store/tsconfig.legacy.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4-
"moduleResolution": "Node"
4+
"moduleResolution": "Node",
5+
"paths": {
6+
"@tanstack/store": ["../store/src"]
7+
}
58
},
69
"include": ["src/**/*.ts", "src/**/*.tsx"],
710
"exclude": ["src/tests/**"]

‎packages/react-store/tsconfig.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
"compilerOptions": {
44
"jsx": "react",
55
"moduleResolution": "Bundler",
6-
"types": ["vitest/globals"]
6+
"types": ["vitest/globals"],
7+
"paths": {
8+
"@tanstack/store": ["../store/src"]
9+
}
710
},
811
"include": ["src/**/*.ts", "src/**/*.tsx", ".eslintrc.cjs", "vite.config.ts"]
912
}

‎packages/react-store/tsconfig.legacy.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
44
"jsx": "react",
5-
"moduleResolution": "Node"
5+
"moduleResolution": "Node",
6+
"paths": {
7+
"@tanstack/store": ["../store/src"]
8+
}
69
},
710
"include": ["src/**/*.ts", "src/**/*.tsx"],
811
"exclude": ["src/tests/**"]

‎packages/solid-store/tsconfig.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
"jsx": "preserve",
55
"jsxImportSource": "solid-js",
66
"moduleResolution": "Bundler",
7-
"types": ["vitest/globals"]
7+
"types": ["vitest/globals"],
8+
"paths": {
9+
"@tanstack/store": ["../store/src"]
10+
}
811
},
912
"include": ["src/**/*.ts", "src/**/*.tsx", ".eslintrc.cjs", "vite.config.ts"]
1013
}

‎packages/solid-store/tsconfig.legacy.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
"compilerOptions": {
44
"jsx": "preserve",
55
"jsxImportSource": "solid-js",
6-
"moduleResolution": "Node"
6+
"moduleResolution": "Node",
7+
"paths": {
8+
"@tanstack/store": ["../store/src"]
9+
}
710
},
811
"include": ["src/**/*.ts", "src/**/*.tsx"],
912
"exclude": ["src/tests/**"]

‎packages/vue-store/tsconfig.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
"jsx": "preserve",
55
"jsxImportSource": "vue",
66
"moduleResolution": "Bundler",
7-
"types": ["vitest/globals", "vue/jsx"]
7+
"types": ["vitest/globals", "vue/jsx"],
8+
"paths": {
9+
"@tanstack/store": ["../store/src"]
10+
}
811
},
912
"include": [
1013
"src/**/*.ts",

‎packages/vue-store/tsconfig.legacy.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
"jsx": "preserve",
55
"jsxImportSource": "vue",
66
"moduleResolution": "Node",
7-
"types": ["vue/jsx"]
7+
"types": ["vue/jsx"],
8+
"paths": {
9+
"@tanstack/store": ["../store/src"]
10+
}
811
},
912
"include": ["src/**/*.ts", "src/**/*.tsx"],
1013
"exclude": ["src/tests/**"]

‎pnpm-lock.yaml

+58-21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tsconfig.json

+3-9
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,22 @@
55
"allowSyntheticDefaultImports": true,
66
"allowUnreachableCode": false,
77
"allowUnusedLabels": false,
8-
"baseUrl": ".",
98
"checkJs": true,
109
"declaration": true,
11-
"declarationMap": true,
1210
"esModuleInterop": true,
1311
"forceConsistentCasingInFileNames": true,
1412
"isolatedModules": true,
15-
"lib": ["DOM", "DOM.Iterable", "ES2020"],
16-
"module": "ES2020",
17-
"moduleResolution": "Node", // TODO change this to Node16 or Bundler
13+
"lib": ["DOM", "DOM.Iterable", "ES2022"],
14+
"module": "ES2022",
1815
"noEmit": true,
19-
"noImplicitAny": true,
2016
"noImplicitReturns": true,
21-
"noImplicitThis": true,
2217
"noUncheckedIndexedAccess": true,
2318
"noUnusedLocals": true,
2419
"noUnusedParameters": true,
2520
"resolveJsonModule": true,
2621
"skipLibCheck": true,
2722
"strict": true,
28-
"strictNullChecks": true,
2923
"target": "ES2020"
3024
},
31-
"include": [".eslintrc.cjs", "rollup.config.js", "scripts"]
25+
"include": [".eslintrc.cjs", "prettier.config.js"]
3226
}

0 commit comments

Comments
 (0)
Please sign in to comment.