Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bumping husky to version 7 #179

Merged
merged 4 commits into from
Nov 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions website/.githooks/post-merge.sh → website/.husky/post-merge
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

function changed {
git diff --name-only HEAD@{1} HEAD | grep "^$1" > /dev/null 2>&1
Expand All @@ -7,6 +8,3 @@ function changed {
if changed 'yarn.lock'; then
echo "📦 yarn.lock changed. Run yarn install to bring your dependencies up to date."
fi

# todo: check for changes to acf-json folder
chmod -R 777 ../wordpress/wp-content/themes/headless/acf-json
5 changes: 5 additions & 0 deletions website/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

cd website
yarn lint-staged
13 changes: 4 additions & 9 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"stylelint:fix": "npx stylelint '**/*.scss' --fix",
"eslint": "npx eslint '**/*.{js,jsx,ts,tsx}'",
"eslint:fix": "npx eslint '**/*.{js,jsx,ts,tsx}' --fix",
"analyze": "cross-env ANALYZE=true yarn build"
"analyze": "cross-env ANALYZE=true yarn build",
"prepare": "cd .. && husky install website/.husky && chmod ug+x website/.husky/* || true"
},
"author": "Patronage.org",
"license": "private",
Expand Down Expand Up @@ -44,8 +45,8 @@
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"husky": "^4.3.8",
"lint-staged": "^11.1.2",
"husky": "^7.0.4",
"lint-staged": "^12.0.3",
"prettier": "^2.3.2",
"stylelint": "^13.13.1",
"stylelint-config-idiomatic-order": "^8.1.0",
Expand All @@ -54,12 +55,6 @@
"stylelint-prettier": "^1.2.0",
"stylelint-scss": "^3.20.1"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"post-merge": "./.githooks/post-merge.sh"
}
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": "eslint --fix",
"*.{css,scss}": "stylelint --fix"
Expand Down
Loading