|
4 | 4 | "description": "Check if a number is a valid Numer Identyfikacji Podatkowej (NIP)", |
5 | 5 | "main": "dist/cjs/index.js", |
6 | 6 | "module": "dist/esm/index.js", |
7 | | - "source": "src/index.js", |
| 7 | + "source": "src/index.ts", |
| 8 | + "types": "src/index.ts", |
8 | 9 | "sideEffects": false, |
9 | 10 | "type": "module", |
10 | 11 | "exports": { |
11 | 12 | "default": "./dist/esm/index.js" |
12 | 13 | }, |
13 | 14 | "scripts": { |
14 | 15 | "build": "yarn build-esm && yarn build-cjs", |
15 | | - "build-esm": "BABEL_ENV=production-esm babel src -d dist/esm --ignore **/*.spec.js", |
16 | | - "build-cjs": "BABEL_ENV=production-cjs babel src -d dist/cjs --ignore **/*.spec.js", |
| 16 | + "build-esm": "tsc --project tsconfig.build.json --outDir dist/esm --module esnext", |
| 17 | + "build-cjs": "tsc --project tsconfig.build.json --outDir dist/cjs --module commonjs", |
17 | 18 | "clean": "rimraf dist", |
18 | 19 | "jest": "jest", |
19 | | - "lint": "eslint src", |
| 20 | + "lint": "eslint src --ext .js,.ts", |
20 | 21 | "postinstall": "husky install", |
21 | 22 | "prepack": "yarn clean && yarn build", |
22 | 23 | "prettier": "prettier --check . --cache", |
23 | | - "test": "yarn lint && yarn prettier && yarn jest" |
| 24 | + "test": "yarn lint && yarn tsc && yarn prettier && yarn jest", |
| 25 | + "tsc": "tsc --noEmit" |
24 | 26 | }, |
25 | 27 | "keywords": [ |
26 | 28 | "validation", |
|
32 | 34 | }, |
33 | 35 | "license": "MIT", |
34 | 36 | "devDependencies": { |
35 | | - "@babel/cli": "^7.15.0", |
36 | 37 | "@babel/core": "^7.15.0", |
37 | 38 | "@babel/preset-env": "^7.15.0", |
| 39 | + "@babel/preset-typescript": "^7.18.6", |
| 40 | + "@types/jest": "^29.0.0", |
| 41 | + "@typescript-eslint/eslint-plugin": "^5.41.0", |
| 42 | + "@typescript-eslint/parser": "^5.44.0", |
38 | 43 | "eslint": "^8.26.0", |
39 | 44 | "eslint-config-wojtekmaj": "^0.7.1", |
40 | 45 | "husky": "^8.0.0", |
41 | 46 | "jest": "^29.0.0", |
42 | 47 | "prettier": "^2.7.0", |
43 | 48 | "pretty-quick": "^3.1.0", |
44 | | - "rimraf": "^3.0.0" |
| 49 | + "rimraf": "^3.0.0", |
| 50 | + "typescript": "^4.9.4" |
45 | 51 | }, |
46 | 52 | "resolutions": { |
47 | 53 | "semver@7.0.0": "^7.0.0" |
|
0 commit comments