only run eslint if there is a change in frontend w/ burnettk

This commit is contained in:
jasquat 2023-05-31 16:28:56 -04:00
parent 35864d8abe
commit ab2a04f4fa
No known key found for this signature in database
1 changed files with 2 additions and 1 deletions

View File

@ -49,7 +49,7 @@ function run_pre_commmit() {
for react_project in "${react_projects[@]}" ; do
# if pre, only do stuff when there are changes
if [[ "$subcommand" != "pre" ]] || [[ -n "$(git status --porcelain "$react_project")" ]]; then
if [[ -n "$(git status --porcelain "$react_project")" ]]; then
pushd "$react_project"
npm run lint:fix
popd
@ -57,6 +57,7 @@ for react_project in "${react_projects[@]}" ; do
done
for python_project in "${python_projects[@]}" ; do
# if pre, only do stuff when there are changes
if [[ "$subcommand" != "pre" ]] || [[ -n "$(git status --porcelain "$python_project")" ]]; then
pushd "$python_project"
run_autofixers || run_autofixers