|
8 | 8 | "start": "next start",
|
9 | 9 | "type-check": "tsc",
|
10 | 10 | "lint": "eslint --ignore-path .gitignore \"src/**/*.+(ts|js|tsx)\"",
|
11 |
| - "lint:fix": "yarn lint --fix", |
12 | 11 | "format": "prettier --ignore-path .gitignore \"src/**/*.+(ts|js|tsx)\" --write"
|
13 | 12 | },
|
| 13 | + "husky": { |
| 14 | + "hooks": { |
| 15 | + "prepare-commit-msg": "exec < /dev/tty && git cz --hook || true", |
| 16 | + "pre-commit": "lint-staged", |
| 17 | + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" |
| 18 | + } |
| 19 | + }, |
| 20 | + "lint-staged": { |
| 21 | + "./src/**/*.{ts,js,jsx,tsx}": [ |
| 22 | + "yarn lint --fix", |
| 23 | + "yarn format" |
| 24 | + ] |
| 25 | + }, |
14 | 26 | "dependencies": {
|
15 | 27 | "next": "9.3.1",
|
16 | 28 | "react": "16.13.0",
|
17 | 29 | "react-dom": "16.13.0"
|
18 | 30 | },
|
19 | 31 | "devDependencies": {
|
| 32 | + "@commitlint/cli": "^8.3.5", |
| 33 | + "@commitlint/config-conventional": "^8.3.4", |
20 | 34 | "@types/node": "^13.9.2",
|
21 | 35 | "@types/react": "^16.9.23",
|
22 | 36 | "@types/react-dom": "^16.9.5",
|
23 | 37 | "@typescript-eslint/eslint-plugin": "^2.24.0",
|
24 | 38 | "@typescript-eslint/parser": "^2.24.0",
|
25 | 39 | "babel-plugin-module-resolver": "^4.0.0",
|
| 40 | + "commitizen": "^4.0.3", |
| 41 | + "cz-conventional-changelog": "3.1.0", |
26 | 42 | "eslint": "^6.8.0",
|
27 | 43 | "eslint-config-airbnb": "^18.1.0",
|
28 | 44 | "eslint-config-prettier": "^6.10.0",
|
|
32 | 48 | "eslint-plugin-prettier": "^3.1.2",
|
33 | 49 | "eslint-plugin-react": "^7.19.0",
|
34 | 50 | "eslint-plugin-react-hooks": "^2.5.0",
|
| 51 | + "husky": "^4.2.3", |
| 52 | + "lint-staged": "^10.0.8", |
35 | 53 | "prettier": "^1.19.1",
|
36 | 54 | "typescript": "^3.8.3"
|
| 55 | + }, |
| 56 | + "config": { |
| 57 | + "commitizen": { |
| 58 | + "path": "./node_modules/cz-conventional-changelog" |
| 59 | + } |
37 | 60 | }
|
38 | 61 | }
|
0 commit comments