We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8263d4 commit 4c1d90fCopy full SHA for 4c1d90f
1 file changed
scripts/lint.sh
@@ -8,12 +8,32 @@
8
9
set -euo pipefail
10
11
+use_cache=true
12
+for arg in "$@"; do
13
+ if [[ "$arg" == "--no-cache" ]]; then
14
+ use_cache=false
15
+ break
16
+ fi
17
+done
18
+
19
+if [[ "$#" -eq 0 ]]; then
20
+ set -- .
21
+fi
22
23
+eslint_args=()
24
+if [[ "$use_cache" == "true" ]]; then
25
+ eslint_args+=(
26
+ --cache
27
+ --cache-location=node_modules/.cache/eslint
28
+ --cache-strategy content
29
+ )
30
31
+eslint_args+=(
32
+ --concurrency=auto
33
+ --no-warn-ignored
34
+ "$@"
35
+)
36
37
NODE_OPTIONS="${NODE_OPTIONS:---max_old_space_size=8192}" \
38
SEATBELT_FROZEN="${SEATBELT_FROZEN:-0}" \
- exec npx eslint \
- --cache \
- --cache-location=node_modules/.cache/eslint \
- --cache-strategy content \
- --concurrency=auto \
- --no-warn-ignored \
- "${@:-.}"
39
+ exec npx eslint "${eslint_args[@]}"
0 commit comments