|
11 | 11 | "scripts": { |
12 | 12 | "build": "yarn build-js && yarn copy-styles", |
13 | 13 | "build-js": "yarn build-js-esm && yarn build-js-cjs", |
14 | | - "build-js-esm": "BABEL_ENV=production-esm babel src -d dist/esm --ignore \"**/*.spec.js,**/*.spec.jsx\"", |
15 | | - "build-js-cjs": "BABEL_ENV=production-cjs babel src -d dist/cjs --ignore \"**/*.spec.js,**/*.spec.jsx\"", |
| 14 | + "build-js-esm": "tsc --project tsconfig.build.json --outDir dist/esm --module esnext", |
| 15 | + "build-js-cjs": "tsc --project tsconfig.build.json --outDir dist/cjs --module commonjs", |
16 | 16 | "clean": "rimraf dist", |
17 | 17 | "copy-styles": "node ./copy-styles.mjs", |
18 | 18 | "jest": "jest", |
19 | | - "lint": "eslint . --ext .js,.jsx", |
| 19 | + "lint": "eslint . --ext .js,.jsx,.ts,.tsx", |
20 | 20 | "postinstall": "husky install", |
21 | 21 | "prepack": "yarn clean && yarn build", |
22 | 22 | "prettier": "prettier --check . --cache", |
23 | | - "test": "yarn lint && yarn prettier && yarn jest" |
| 23 | + "test": "yarn lint && yarn tsc && yarn prettier && yarn jest", |
| 24 | + "tsc": "tsc --noEmit" |
24 | 25 | }, |
25 | 26 | "keywords": [ |
26 | 27 | "calendar", |
|
35 | 36 | }, |
36 | 37 | "license": "MIT", |
37 | 38 | "dependencies": { |
| 39 | + "@types/react": "*", |
38 | 40 | "@wojtekmaj/date-utils": "^1.1.3", |
39 | 41 | "clsx": "^1.2.1", |
40 | 42 | "get-user-locale": "^2.1.3", |
41 | 43 | "prop-types": "^15.6.0" |
42 | 44 | }, |
43 | 45 | "devDependencies": { |
44 | | - "@babel/cli": "^7.15.0", |
45 | 46 | "@babel/core": "^7.15.0", |
46 | 47 | "@babel/preset-env": "^7.15.0", |
47 | 48 | "@babel/preset-react": "^7.14.0", |
| 49 | + "@babel/preset-typescript": "^7.18.6", |
48 | 50 | "@testing-library/jest-dom": "^5.15.0", |
49 | 51 | "@testing-library/react": "^13.4.0", |
| 52 | + "@types/jest": "^29.0.0", |
| 53 | + "@typescript-eslint/eslint-plugin": "^5.41.0", |
| 54 | + "@typescript-eslint/parser": "^5.44.0", |
50 | 55 | "eslint": "^8.26.0", |
51 | 56 | "eslint-config-wojtekmaj": "^0.7.1", |
52 | 57 | "husky": "^8.0.0", |
|
56 | 61 | "pretty-quick": "^3.1.0", |
57 | 62 | "react": "^18.2.0", |
58 | 63 | "react-dom": "^18.2.0", |
59 | | - "rimraf": "^3.0.0" |
| 64 | + "rimraf": "^3.0.0", |
| 65 | + "typescript": "^4.9.5" |
60 | 66 | }, |
61 | 67 | "peerDependencies": { |
62 | 68 | "react": "^16.8.0 || ^17.0.0 || ^18.0.0", |
|
0 commit comments