-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds pre-commit hook for linting (#146)
* ➕ ADDS: pre-commit hook * 💫 UPDATE: pre-commit hook to not run during rebase
- Loading branch information
Showing
4 changed files
with
847 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
if [ -d "$(git rev-parse --git-path rebase-merge)" ] || [ -d "$(git rev-parse --git-path rebase-apply)" ]; then | ||
echo "Rebase in progress. Skipping pre-commit hook.\n"; | ||
exit 0; | ||
fi | ||
|
||
lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"*.css": [ "npm run lint:css" ], | ||
"*.{js,jsx,ts,tsx}": [ "npm run lint:js" ], | ||
"*.php": [ "npm run lint:php" ], | ||
"*.{js,json,jsx,md,ts,tsx,yml,yaml}": [ "npm run format:check" ] | ||
} |
Oops, something went wrong.