Skip to content

Commit

Permalink
Improve TypeScript config
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Nov 8, 2023
1 parent 781e008 commit c845407
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/react-calendar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"prepack": "yarn clean && yarn build",
"prettier": "prettier --check . --cache",
"test": "yarn lint && yarn tsc && yarn prettier && yarn unit",
"tsc": "tsc --noEmit",
"tsc": "tsc",
"unit": "vitest",
"watch": "yarn build-js-esm --watch & yarn build-js-cjs --watch & nodemon --watch src --ext css --exec \"yarn copy-styles\""
},
Expand Down
6 changes: 6 additions & 0 deletions packages/react-calendar/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": false,
"outDir": "dist",
"rootDir": "src"
},
"include": ["src"],
"exclude": ["src/**/*.spec.ts", "src/**/*.spec.tsx"]
}
3 changes: 2 additions & 1 deletion packages/react-calendar/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
"jsx": "react",
"module": "esnext",
"moduleResolution": "node",
"noEmit": true,
"noUncheckedIndexedAccess": true,
"outDir": "dist",
"strict": true,
"target": "es5",
"verbatimModuleSyntax": true
},
"include": ["src"]
"exclude": ["dist"]
}
1 change: 1 addition & 0 deletions sample/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"jsx": "react-jsx",
"module": "esnext",
"moduleResolution": "bundler",
"noEmit": true,
"noUncheckedIndexedAccess": true,
"outDir": "dist",
"strict": true,
Expand Down
2 changes: 1 addition & 1 deletion test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"prettier": "prettier --check . --cache",
"test": "yarn lint && yarn tsc && yarn prettier",
"tsc": "tsc --noEmit"
"tsc": "tsc"
},
"author": {
"name": "Wojciech Maj",
Expand Down
1 change: 1 addition & 0 deletions test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"jsx": "react-jsx",
"module": "esnext",
"moduleResolution": "bundler",
"noEmit": true,
"noUncheckedIndexedAccess": true,
"outDir": "dist",
"strict": true,
Expand Down

0 comments on commit c845407

Please sign in to comment.