Skip to content

Commit 681b03b

Browse files
committed
chore: update un tsconfig
Change tsconfig and lintstaged config to make `tsc` command works
1 parent 9135963 commit 681b03b

7 files changed

Lines changed: 36 additions & 23 deletions

File tree

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.eslintrc.
2-
vite.config.js
2+
vite.config.js
3+
.lintstagedrc.js

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"husky": "^9.0.11",
2323
"lint-staged": "^15.2.2",
2424
"prettier": "3.2.5",
25-
"typescript": "*"
25+
"typescript": "^5.4.3"
2626
},
2727
"scripts": {
2828
"prepare": "husky"
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
vite.config.js
1+
vite.config.js
2+
node_modules
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
module.exports = {
2-
"*.(tsx|ts)": "tsc",
2+
// because of lint-stages is installed as deps of root
3+
// we need to cd to `packages/json-table-schema-visualizer` before running tsc
4+
// otherwise it will not use the right tsconfig and context
5+
"*.(tsx|ts)": () =>
6+
"cd packages/json-table-schema-visualizer && yarn tsc --noEmit",
37
"*.(tsx|ts|js)": ["eslint --fix", "prettier --write"],
48
"*.(md|json)": "prettier --write",
59
};
Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"extends": "../../tsconfig.json",
23
"compilerOptions": {
34
"target": "es2016",
45
"module": "commonjs",
@@ -7,23 +8,8 @@
78
"@/*": ["./*"]
89
},
910
"allowJs": true,
10-
"checkJs": true,
11-
"noEmit": true,
12-
"esModuleInterop": true,
13-
"forceConsistentCasingInFileNames": true,
14-
"strict": true,
15-
"noImplicitAny": true,
16-
"strictNullChecks": true,
17-
"strictFunctionTypes": true,
18-
"strictBindCallApply": true,
19-
"strictPropertyInitialization": true,
20-
"noUnusedLocals": true,
21-
"noUnusedParameters": true,
22-
"noImplicitReturns": true,
23-
"noFallthroughCasesInSwitch": true,
24-
"skipLibCheck": true,
25-
"jsx": "react-jsx",
26-
"composite": true
11+
"checkJs": true
2712
},
28-
"include": ["./src"]
13+
"exclude": ["node_modules", "vite.config.js"],
14+
"include": ["**/*.ts", "**/*.tsx"]
2915
}

tsconfig.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"compilerOptions": {
3+
"noEmit": true,
4+
"esModuleInterop": true,
5+
"forceConsistentCasingInFileNames": true,
6+
"strict": true,
7+
"noImplicitAny": true,
8+
"strictNullChecks": true,
9+
"strictFunctionTypes": true,
10+
"strictBindCallApply": true,
11+
"strictPropertyInitialization": true,
12+
"noUnusedLocals": true,
13+
"noUnusedParameters": true,
14+
"noImplicitReturns": true,
15+
"noFallthroughCasesInSwitch": true,
16+
"skipLibCheck": true,
17+
"jsx": "react-jsx"
18+
},
19+
"exclude": ["node_modules"],
20+
"include": ["**/*.ts", "**/*.tsx"]
21+
}

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10458,7 +10458,7 @@ typedarray@^0.0.6:
1045810458
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
1045910459
integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==
1046010460

10461-
typescript@*, "typescript@>=3 < 6", typescript@^5.4.3:
10461+
"typescript@>=3 < 6", typescript@^5.4.3:
1046210462
version "5.4.3"
1046310463
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.3.tgz#5c6fedd4c87bee01cd7a528a30145521f8e0feff"
1046410464
integrity sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==

0 commit comments

Comments
 (0)