|
16 | 16 | "commit": "cz", |
17 | 17 | "prepublishOnly": "yarn build", |
18 | 18 | "build": "yarn build:parcel", |
19 | | - "build:storybook": "build-storybook", |
20 | 19 | "build:parcel": "parcel build ./src/index.ts", |
| 20 | + "build:storybook": "build-storybook", |
21 | 21 | "serve": "npm-run-all --parallel serve:*", |
22 | 22 | "serve:parcel": "parcel watch ./src/index.ts", |
23 | 23 | "serve:storybook": "start-storybook -p 6006", |
24 | | - "style": "yarn style:format && yarn style:lint", |
25 | | - "style:format": "prettier -w src", |
26 | | - "style:lint": "eslint src/**" |
| 24 | + "format": "run-s format:*", |
| 25 | + "format:eslint": "yarn lint --fix", |
| 26 | + "format:prettier": "prettier --write \"src/**.{js,ts}\"", |
| 27 | + "lint": "eslint \"src/**.{js,ts}\"" |
27 | 28 | }, |
28 | 29 | "peerDependencies": { |
29 | 30 | "@types/sortablejs": "^1.10.0", |
|
60 | 61 | "eslint-plugin-react": "^7.21.2", |
61 | 62 | "husky": "^4.3.0", |
62 | 63 | "jest": "^26.4.2", |
| 64 | + "lint-staged": "^10.4.0", |
63 | 65 | "npm-run-all": "^4.1.5", |
64 | 66 | "parcel": "^2.0.0-beta.1", |
65 | 67 | "prettier": "^2.1.2", |
|
86 | 88 | "husky": { |
87 | 89 | "hooks": { |
88 | 90 | "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", |
89 | | - "pre-commit": "yarn style && yarn build", |
90 | | - "pre-push": "yarn style && yarn build" |
| 91 | + "pre-commit": "yarn lint-staged", |
| 92 | + "pre-push": "yarn build" |
91 | 93 | } |
92 | 94 | }, |
| 95 | + "lint-staged": { |
| 96 | + "*.{ts}": "yarn format" |
| 97 | + }, |
93 | 98 | "release": { |
94 | 99 | "plugins": [ |
95 | 100 | "@semantic-release/commit-analyzer", |
|
0 commit comments