Skip to content

Commit

Permalink
Merge pull request #3411 from 10up/chore/issue-3410
Browse files Browse the repository at this point in the history
Add Husky and Lint-Staged
  • Loading branch information
felipeelia authored Mar 28, 2023
2 parents 213cce7 + 66b94bb commit 938d42a
Show file tree
Hide file tree
Showing 6 changed files with 807 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
/.eslintrc.js export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.husky export-ignore
/.lintstagedrc.json export-ignore
/.stylelintrc export-ignore
/.wp-env.json export-ignore
/CHANGELOG.md export-ignore
Expand Down
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
11 changes: 11 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"*.css": [
"10up-toolkit lint-style"
],
"*.js": [
"10up-toolkit lint-js"
],
"*.php": [
"./vendor/bin/phpcs --extensions=php --runtime-set testVersion 7.0- -s"
]
}
Loading

0 comments on commit 938d42a

Please sign in to comment.