|
16 | 16 | "test:watch": "jest --watch", |
17 | 17 | "test:coverage": "jest --coverage", |
18 | 18 | "presetup": "npm i shelljs compare-versions", |
19 | | - "setup": "node ./bin/setup.js" |
| 19 | + "setup": "node ./bin/setup.js", |
| 20 | + "lint": "eslint --fix src/**/*.js", |
| 21 | + "format": "prettier src/**/*.js --write --config ./.prettierrc" |
20 | 22 | }, |
21 | 23 | "keywords": [], |
22 | 24 | "author": "", |
|
30 | 32 | "@testing-library/user-event": "^12.6.3", |
31 | 33 | "babel-loader": "^8.2.2", |
32 | 34 | "css-loader": "^5.0.1", |
| 35 | + "eslint": "^7.19.0", |
| 36 | + "eslint-config-prettier": "^7.2.0", |
| 37 | + "eslint-plugin-prettier": "^3.3.1", |
| 38 | + "eslint-plugin-react": "^7.22.0", |
| 39 | + "eslint-plugin-react-hooks": "^4.2.0", |
| 40 | + "husky": "^4.3.8", |
33 | 41 | "jest": "^26.6.3", |
34 | 42 | "jest-dom": "^4.0.0", |
| 43 | + "lint-staged": "^10.5.3", |
35 | 44 | "mini-css-extract-plugin": "^1.3.5", |
36 | 45 | "node-fetch": "^2.6.1", |
37 | 46 | "node-sass": "^5.0.0", |
| 47 | + "prettier": "^2.2.1", |
38 | 48 | "sass-loader": "^10.1.1", |
39 | 49 | "style-loader": "^2.0.0", |
40 | 50 | "webpack": "^5.19.0", |
|
45 | 55 | "npm": ">=5", |
46 | 56 | "node": ">=8.15.1" |
47 | 57 | }, |
| 58 | + "husky": { |
| 59 | + "hooks": { |
| 60 | + "pre-commit": "npm run lint && npm run format" |
| 61 | + } |
| 62 | + }, |
| 63 | + "lint-staged": { |
| 64 | + "*.+(js|jsx)": ["eslint --fix", "git add"], |
| 65 | + "*.+(json|css|md)": ["prettier --write", "git add"] |
| 66 | + }, |
48 | 67 | "dependencies": { |
49 | 68 | "compare-versions": "^3.6.0", |
50 | 69 | "dotenv": "^8.2.0", |
|
0 commit comments