File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88
99set -euo pipefail
1010
11+ # Disable the wrapper's cache flags when ESLint caching is explicitly disabled.
1112use_cache=true
1213for arg in " $@ " ; do
1314 if [[ " $arg " == " --no-cache" ]]; then
@@ -16,10 +17,12 @@ for arg in "$@"; do
1617 fi
1718done
1819
20+ # Preserve the old default of linting the whole repo when no target is passed.
1921if [[ " $# " -eq 0 ]]; then
2022 set -- .
2123fi
2224
25+ # Build ESLint args so cache flags can be conditionally omitted.
2326eslint_args=()
2427if [[ " $use_cache " == " true" ]]; then
2528 eslint_args+=(
@@ -34,6 +37,7 @@ eslint_args+=(
3437 " $@ "
3538)
3639
40+ # Run ESLint with the repo's default memory ceiling and seatbelt behavior.
3741NODE_OPTIONS=" ${NODE_OPTIONS:- --max_old_space_size=8192} " \
3842SEATBELT_FROZEN=" ${SEATBELT_FROZEN:- 0} " \
3943 exec npx eslint " ${eslint_args[@]} "
You can’t perform that action at this time.
0 commit comments