Skip to content

Commit a77ec83

Browse files
committed
Comment lint argument handling
Made-with: Cursor
1 parent 4c1d90f commit a77ec83

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

scripts/lint.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
set -euo pipefail
1010

11+
# Disable the wrapper's cache flags when ESLint caching is explicitly disabled.
1112
use_cache=true
1213
for arg in "$@"; do
1314
if [[ "$arg" == "--no-cache" ]]; then
@@ -16,10 +17,12 @@ for arg in "$@"; do
1617
fi
1718
done
1819

20+
# Preserve the old default of linting the whole repo when no target is passed.
1921
if [[ "$#" -eq 0 ]]; then
2022
set -- .
2123
fi
2224

25+
# Build ESLint args so cache flags can be conditionally omitted.
2326
eslint_args=()
2427
if [[ "$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.
3741
NODE_OPTIONS="${NODE_OPTIONS:---max_old_space_size=8192}" \
3842
SEATBELT_FROZEN="${SEATBELT_FROZEN:-0}" \
3943
exec npx eslint "${eslint_args[@]}"

0 commit comments

Comments
 (0)