Skip to content

Commit bfdd986

Browse files
committed
Use uppercase lint script variables
Made-with: Cursor
1 parent a77ec83 commit bfdd986

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

scripts/lint.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,30 @@
88

99
set -euo pipefail
1010

11-
# Disable the wrapper's cache flags when ESLint caching is explicitly disabled.
12-
use_cache=true
13-
for arg in "$@"; do
14-
if [[ "$arg" == "--no-cache" ]]; then
15-
use_cache=false
11+
# parse args
12+
USE_CACHE=true
13+
for ARG in "$@"; do
14+
if [[ "$ARG" == "--no-cache" ]]; then
15+
USE_CACHE=false
1616
break
1717
fi
1818
done
1919

20-
# Preserve the old default of linting the whole repo when no target is passed.
20+
# Preserve default behavior of linting the whole repo when no target is passed.
2121
if [[ "$#" -eq 0 ]]; then
2222
set -- .
2323
fi
2424

25-
# Build ESLint args so cache flags can be conditionally omitted.
26-
eslint_args=()
27-
if [[ "$use_cache" == "true" ]]; then
28-
eslint_args+=(
25+
# Build ESLint args
26+
ESLINT_ARGS=()
27+
if [[ "$USE_CACHE" == "true" ]]; then
28+
ESLINT_ARGS+=(
2929
--cache
3030
--cache-location=node_modules/.cache/eslint
3131
--cache-strategy content
3232
)
3333
fi
34-
eslint_args+=(
34+
ESLINT_ARGS+=(
3535
--concurrency=auto
3636
--no-warn-ignored
3737
"$@"
@@ -40,4 +40,4 @@ eslint_args+=(
4040
# Run ESLint with the repo's default memory ceiling and seatbelt behavior.
4141
NODE_OPTIONS="${NODE_OPTIONS:---max_old_space_size=8192}" \
4242
SEATBELT_FROZEN="${SEATBELT_FROZEN:-0}" \
43-
exec npx eslint "${eslint_args[@]}"
43+
exec npx eslint "${ESLINT_ARGS[@]}"

0 commit comments

Comments
 (0)