Skip to content

Commit

Permalink
fix: Add husky to run gitHooks (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
annacv authored Jan 24, 2023
1 parent dd7bda0 commit 1368d42
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
22 changes: 22 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"install:local": "npm install file:../x/packages/x-components/empathyco-x-components-3.0.0-alpha.178.tgz --no-save",
"install:utils:local": "npm install file:../x/packages/x-archetype-utils/empathyco-x-archetype-utils-0.1.0-alpha.2.tgz --no-save",
"json:csv": "json-csv ./src/i18n/messages",
"csv:json": "csv-json ./output ./src/i18n/messages"
"csv:json": "csv-json ./output ./src/i18n/messages",
"prepare": "husky install"
},
"dependencies": {
"@empathyco/x-adapter": "^8.0.0-alpha.17",
Expand Down Expand Up @@ -66,6 +67,7 @@
"cypress-cucumber-preprocessor": "~4.3.1",
"eslint": "~8.30.0",
"http-server": "^14.1.0",
"husky": "~8.0.3",
"lint-staged": "~11.2.6",
"postcss": "~8.3.11",
"postcss-dir-pseudo-class": "~6.0.4",
Expand Down Expand Up @@ -93,9 +95,6 @@
"vue-template-compiler": "~2.7.14"
},
"prettier": "@empathyco/eslint-plugin-x/prettier-config",
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"./{src,tests,build}/**/*.{vue,js,jsx,ts,tsx}": [
"eslint --fix",
Expand Down

0 comments on commit 1368d42

Please sign in to comment.