diff options
author | Nick Schonning <nschonni@gmail.com> | 2023-03-26 23:17:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-27 05:17:19 +0200 |
commit | 34225d7199ee79f252275722b98b988e984a0943 (patch) | |
tree | 055866a6021221acf659e8f71c91e815f35e322d /package.json | |
parent | 63a6808ee12e2b23353a62e2a37b20fd48e4e429 (diff) |
Setup Husky and lint-stage for commit fixing (#23308)
Diffstat (limited to 'package.json')
-rw-r--r-- | package.json | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/package.json b/package.json index 90d76001b..0851c838d 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,8 @@ "test:lint:sass": "stylelint \"**/*.{css,scss}\" && prettier --check \"**/*.{css,scss}\"", "test:jest": "cross-env NODE_ENV=test jest", "format": "prettier --write .", - "format-check": "prettier --check ." + "format-check": "prettier --check .", + "prepare": "husky install" }, "repository": { "type": "git", @@ -148,8 +149,10 @@ "eslint-plugin-jsx-a11y": "~6.7.1", "eslint-plugin-promise": "~6.1.1", "eslint-plugin-react": "~7.32.2", + "husky": "^8.0.3", "jest": "^29.5.0", "jest-environment-jsdom": "^29.5.0", + "lint-staged": "^13.1.2", "postcss-scss": "^4.0.6", "prettier": "^2.8.5", "raf": "^3.4.1", @@ -166,5 +169,10 @@ "optionalDependencies": { "bufferutil": "^4.0.7", "utf-8-validate": "^6.0.3" + }, + "lint-staged": { + "*": "prettier --ignore-unknown --write", + "*.{js,jsx}": "eslint --fix", + "*.{css,scss}": "stylelint --fix" } } |