|
12 | 12 | "build": "cross-env NODE_ENV=production webpack",
|
13 | 13 | "release": "run-s build && sh scripts/build.sh",
|
14 | 14 | "prettier": "prettier --write '**/*.{js,jsx,ts,tsx,css,html}'",
|
15 |
| - "lint": "eslint --ext .ts,.tsx,.js,.jsx" |
| 15 | + "lint": "eslint --ext .ts,.tsx,.js,.jsx", |
| 16 | + "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0", |
| 17 | + "version": "npm run changelog && git add ." |
16 | 18 | },
|
17 | 19 | "dependencies": {
|
18 | 20 | "@babel/core": "^7.12.10",
|
|
21 | 23 | "@babel/preset-env": "^7.12.10",
|
22 | 24 | "@babel/preset-react": "^7.12.10",
|
23 | 25 | "@babel/preset-typescript": "^7.12.7",
|
| 26 | + "@commitlint/cli": "^11.0.0", |
| 27 | + "@commitlint/config-angular": "^11.0.0", |
24 | 28 | "@emotion/babel-plugin": "^11.1.2",
|
25 | 29 | "@emotion/babel-plugin-jsx-pragmatic": "^0.1.5",
|
26 | 30 | "@emotion/css": "^11.1.3",
|
|
53 | 57 | "clean-webpack-plugin": "^3.0.0",
|
54 | 58 | "clsx": "^1.1.1",
|
55 | 59 | "connect.io": "^3.1.3",
|
| 60 | + "conventional-changelog-cli": "^2.1.1", |
56 | 61 | "copy-webpack-plugin": "^6.4.0",
|
57 | 62 | "cross-env": "^7.0.3",
|
58 | 63 | "css-loader": "^5.0.1",
|
|
65 | 70 | "fs-extra": "^9.0.1",
|
66 | 71 | "html-loader": "^1.3.2",
|
67 | 72 | "html-webpack-plugin": "^5.0.0-alpha.15",
|
| 73 | + "husky": "^4.3.6", |
| 74 | + "lint-staged": "^10.5.3", |
68 | 75 | "lodash-es": "^4.17.20",
|
69 | 76 | "mini-css-extract-plugin": "^1.3.3",
|
70 | 77 | "node-sass": "^5.0.0",
|
|
96 | 103 | "webpack": "^5.10.1",
|
97 | 104 | "webpack-cli": "^4.2.0",
|
98 | 105 | "webpack-dev-server": "^3.11.0"
|
| 106 | + }, |
| 107 | + "husky": { |
| 108 | + "hooks": { |
| 109 | + "pre-commit": "lint-staged", |
| 110 | + "commit-msg": "commitlint -c .commitlintrc.json -E HUSKY_GIT_PARAMS" |
| 111 | + } |
| 112 | + }, |
| 113 | + "lint-staged": { |
| 114 | + "*.js": "eslint", |
| 115 | + "*.jsx": "eslint", |
| 116 | + "*.ts": "eslint --ext .ts", |
| 117 | + "*.tsx": "eslint --ext .tsx" |
99 | 118 | }
|
100 | 119 | }
|
0 commit comments