only run eslint if there is a change in frontend w/ burnettk
This commit is contained in:
parent
43f23cd630
commit
6dea9098bb
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue