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