@codyswann/lisa 2.163.7 → 2.164.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/codex/hooks-installer.d.ts.map +1 -1
- package/dist/codex/hooks-installer.js +8 -0
- package/dist/codex/hooks-installer.js.map +1 -1
- package/dist/codex/scripts/lint-on-edit.sh +7 -9
- package/dist/codex/scripts/shell-write-nudge.sh +81 -0
- package/dist/opencode/plugin-templates/lisa-lint-on-edit.ts +8 -9
- package/package.json +1 -1
- package/plugins/lisa/.claude-plugin/plugin.json +10 -1
- package/plugins/lisa/.codex-plugin/hooks.json +11 -0
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/hooks/shell-write-nudge.sh +86 -0
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +12 -1
- package/plugins/lisa-copilot/hooks/shell-write-nudge.sh +86 -0
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/hooks.json +6 -0
- package/plugins/lisa-cursor/hooks/shell-write-nudge.sh +86 -0
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/hooks/lint-on-edit.sh +15 -61
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/hooks/lint-on-edit.sh +15 -61
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/hooks/lint-on-edit.sh +15 -61
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/src/base/.claude-plugin/plugin.json +6 -0
- package/plugins/src/base/hooks/shell-write-nudge.sh +86 -0
- package/plugins/src/typescript/hooks/lint-on-edit.sh +15 -61
|
@@ -4,17 +4,15 @@
|
|
|
4
4
|
# =============================================================================
|
|
5
5
|
# Lint-on-Edit Hook (PostToolUse - Write|Edit)
|
|
6
6
|
# =============================================================================
|
|
7
|
-
# Runs oxlint
|
|
8
|
-
#
|
|
9
|
-
# prettier → ast-grep → oxlint --fix → eslint --fix
|
|
7
|
+
# Runs oxlint on each edited TypeScript file. Full ESLint remains enforced at
|
|
8
|
+
# the commit/CI chokepoint via the project lint scripts.
|
|
10
9
|
#
|
|
11
|
-
# oxlint
|
|
12
|
-
#
|
|
13
|
-
# rules for ESLint to handle.
|
|
10
|
+
# oxlint is Rust-native and covers the fast-feedback rule tier in milliseconds;
|
|
11
|
+
# ESLint stays out of the edit-time path.
|
|
14
12
|
#
|
|
15
13
|
# Behavior:
|
|
16
|
-
# - Exit 0: lint passes
|
|
17
|
-
# - Exit 2:
|
|
14
|
+
# - Exit 0: lint passes
|
|
15
|
+
# - Exit 2: oxlint errors remain - blocks Claude so it fixes them immediately
|
|
18
16
|
#
|
|
19
17
|
# @see .claude/rules/verfication.md "Self-Correction Loop" section
|
|
20
18
|
# =============================================================================
|
|
@@ -49,7 +47,7 @@ esac
|
|
|
49
47
|
|
|
50
48
|
cd "$CLAUDE_PROJECT_DIR" || exit 0
|
|
51
49
|
|
|
52
|
-
# Resolve oxlint
|
|
50
|
+
# Resolve oxlint binary - prefer local node_modules/.bin
|
|
53
51
|
if [ -x "./node_modules/.bin/oxlint" ]; then
|
|
54
52
|
OXLINT_CMD="./node_modules/.bin/oxlint"
|
|
55
53
|
elif [ -f "bun.lockb" ] || [ -f "bun.lock" ]; then
|
|
@@ -62,19 +60,7 @@ else
|
|
|
62
60
|
OXLINT_CMD="npx oxlint"
|
|
63
61
|
fi
|
|
64
62
|
|
|
65
|
-
|
|
66
|
-
ESLINT_CMD="./node_modules/.bin/eslint"
|
|
67
|
-
elif [ -f "bun.lockb" ] || [ -f "bun.lock" ]; then
|
|
68
|
-
ESLINT_CMD="bunx eslint"
|
|
69
|
-
elif [ -f "pnpm-lock.yaml" ]; then
|
|
70
|
-
ESLINT_CMD="pnpm exec eslint"
|
|
71
|
-
elif [ -f "yarn.lock" ]; then
|
|
72
|
-
ESLINT_CMD="yarn exec eslint"
|
|
73
|
-
else
|
|
74
|
-
ESLINT_CMD="npx eslint"
|
|
75
|
-
fi
|
|
76
|
-
|
|
77
|
-
# 1) oxlint --fix (REQUIRED in the Phase 2 hybrid pipeline)
|
|
63
|
+
# oxlint (REQUIRED in the Phase 2 hybrid pipeline)
|
|
78
64
|
# If oxlint is missing the project is out of sync with the current Lisa
|
|
79
65
|
# governance — fail loudly rather than silently skipping. ESLint alone is
|
|
80
66
|
# no longer a complete lint pass.
|
|
@@ -89,46 +75,14 @@ if [ ! -f ".oxlintrc.json" ] && [ ! -f ".oxlintrc.jsonc" ] && [ ! -f "oxlint.con
|
|
|
89
75
|
exit 2
|
|
90
76
|
fi
|
|
91
77
|
|
|
92
|
-
echo "Running oxlint
|
|
93
|
-
OX_OUTPUT=$($OXLINT_CMD --
|
|
78
|
+
echo "Running oxlint on: $FILE_PATH"
|
|
79
|
+
OX_OUTPUT=$($OXLINT_CMD --quiet "$FILE_PATH" 2>&1)
|
|
94
80
|
OX_EXIT=$?
|
|
95
81
|
if [ $OX_EXIT -ne 0 ]; then
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
if [ $OX_EXIT -ne 0 ]; then
|
|
100
|
-
echo "oxlint found unfixable errors in: $FILE_PATH" >&2
|
|
101
|
-
echo "$OX_OUTPUT" >&2
|
|
102
|
-
exit 2
|
|
103
|
-
fi
|
|
104
|
-
fi
|
|
105
|
-
|
|
106
|
-
# 2) ESLint --fix --quiet --cache
|
|
107
|
-
# --quiet: suppress warnings, only show errors
|
|
108
|
-
# --cache: use ESLint cache for performance
|
|
109
|
-
# --rule: disable no-unused-vars auto-fix to prevent removing imports that Claude
|
|
110
|
-
# plans to use in a subsequent edit (pre-commit hook still catches them)
|
|
111
|
-
echo "Running ESLint --fix on: $FILE_PATH"
|
|
112
|
-
|
|
113
|
-
# First pass: attempt auto-fix
|
|
114
|
-
OUTPUT=$($ESLINT_CMD --fix --quiet --cache --rule '@typescript-eslint/no-unused-vars: off' "$FILE_PATH" 2>&1)
|
|
115
|
-
FIX_EXIT=$?
|
|
116
|
-
|
|
117
|
-
if [ $FIX_EXIT -eq 0 ]; then
|
|
118
|
-
echo "ESLint: No errors in $(basename "$FILE_PATH")"
|
|
119
|
-
exit 0
|
|
120
|
-
fi
|
|
121
|
-
|
|
122
|
-
# Auto-fix resolved some issues but errors remain — re-run to get remaining errors
|
|
123
|
-
OUTPUT=$($ESLINT_CMD --quiet --cache "$FILE_PATH" 2>&1)
|
|
124
|
-
LINT_EXIT=$?
|
|
125
|
-
|
|
126
|
-
if [ $LINT_EXIT -eq 0 ]; then
|
|
127
|
-
echo "ESLint: Auto-fixed all errors in $(basename "$FILE_PATH")"
|
|
128
|
-
exit 0
|
|
82
|
+
echo "oxlint found errors in: $FILE_PATH" >&2
|
|
83
|
+
echo "$OX_OUTPUT" >&2
|
|
84
|
+
exit 2
|
|
129
85
|
fi
|
|
130
86
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
echo "$OUTPUT" >&2
|
|
134
|
-
exit 2
|
|
87
|
+
echo "oxlint: No errors in $(basename "$FILE_PATH")"
|
|
88
|
+
exit 0
|
|
@@ -40,6 +40,12 @@
|
|
|
40
40
|
{ "type": "command", "command": "command -v entire >/dev/null 2>&1 && entire hooks claude-code post-todo || true" }
|
|
41
41
|
]
|
|
42
42
|
},
|
|
43
|
+
{
|
|
44
|
+
"matcher": "Bash",
|
|
45
|
+
"hooks": [
|
|
46
|
+
{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/shell-write-nudge.sh" }
|
|
47
|
+
]
|
|
48
|
+
},
|
|
43
49
|
{
|
|
44
50
|
"matcher": "TeamCreate",
|
|
45
51
|
"hooks": [
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# This file is managed by Lisa.
|
|
3
|
+
# Do not edit directly — changes will be overwritten on the next `lisa` run.
|
|
4
|
+
# =============================================================================
|
|
5
|
+
# Shell Write Nudge Hook (PostToolUse - Bash)
|
|
6
|
+
# =============================================================================
|
|
7
|
+
# Emits a one-line, non-blocking notice when a Bash command appears to mutate a
|
|
8
|
+
# tracked repository file directly. This keeps shell escape hatches visible
|
|
9
|
+
# without blocking legitimate scripts or codemods.
|
|
10
|
+
# =============================================================================
|
|
11
|
+
set -uo pipefail
|
|
12
|
+
|
|
13
|
+
JSON_INPUT="$(cat)"
|
|
14
|
+
|
|
15
|
+
command -v jq >/dev/null 2>&1 || exit 0
|
|
16
|
+
|
|
17
|
+
COMMAND="$(printf '%s' "$JSON_INPUT" | jq -r '.tool_input.command // empty' 2>/dev/null || true)"
|
|
18
|
+
[ -n "$COMMAND" ] || exit 0
|
|
19
|
+
|
|
20
|
+
case "$COMMAND" in
|
|
21
|
+
bun\ run* | npm\ run* | pnpm\ run* | yarn\ run* | node\ scripts/* | bun\ scripts/* | bash\ scripts/* | sh\ scripts/*)
|
|
22
|
+
exit 0
|
|
23
|
+
;;
|
|
24
|
+
esac
|
|
25
|
+
|
|
26
|
+
repo_root="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
27
|
+
cd "$repo_root" 2>/dev/null || exit 0
|
|
28
|
+
|
|
29
|
+
is_tracked_file() {
|
|
30
|
+
local candidate="$1"
|
|
31
|
+
[ -n "$candidate" ] || return 1
|
|
32
|
+
candidate="${candidate#./}"
|
|
33
|
+
git ls-files --error-unmatch -- "$candidate" >/dev/null 2>&1
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
# Returns 0 when an inline runtime command (python -c / node -e / bun -e) contains
|
|
37
|
+
# explicit write-intent indicators. Read-only operations such as open(f).read() or
|
|
38
|
+
# readFileSync should not trigger the nudge.
|
|
39
|
+
inline_runtime_intends_to_write() {
|
|
40
|
+
local cmd="$1"
|
|
41
|
+
# Python: open() with write/append mode as second positional argument
|
|
42
|
+
[[ "$cmd" == *", 'w'"* || "$cmd" == *", 'a'"* || "$cmd" == *", 'wb'"* || "$cmd" == *", 'ab'"* ]] && return 0
|
|
43
|
+
[[ "$cmd" == *', "w"'* || "$cmd" == *', "a"'* || "$cmd" == *', "wb"'* || "$cmd" == *', "ab"'* ]] && return 0
|
|
44
|
+
# Python / general: explicit .write( method call
|
|
45
|
+
[[ "$cmd" == *'.write('* ]] && return 0
|
|
46
|
+
# Node/Bun fs write functions
|
|
47
|
+
[[ "$cmd" == *'writeFile'* || "$cmd" == *'appendFile'* || "$cmd" == *'createWriteStream'* ]] && return 0
|
|
48
|
+
return 1
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
command_mentions_tracked_write() {
|
|
52
|
+
local token
|
|
53
|
+
local sed_command_re='(^|[[:space:];&|])sed[[:space:]]'
|
|
54
|
+
local inline_runtime_re='(^|[[:space:];&|])(python3?|node|bun)[[:space:]]+-[ce][[:space:]]'
|
|
55
|
+
|
|
56
|
+
if [[ "$COMMAND" =~ $sed_command_re && "$COMMAND" == *"-i"* ]]; then
|
|
57
|
+
while IFS= read -r token; do
|
|
58
|
+
is_tracked_file "$token" && return 0
|
|
59
|
+
done < <(printf '%s\n' "$COMMAND" | tr ' ' '\n' | sed 's/^[\"'\'']//; s/[\"'\'',;|&)]$//')
|
|
60
|
+
fi
|
|
61
|
+
|
|
62
|
+
while IFS= read -r token; do
|
|
63
|
+
token="${token#./}"
|
|
64
|
+
is_tracked_file "$token" && return 0
|
|
65
|
+
done < <(
|
|
66
|
+
printf '%s\n' "$COMMAND" |
|
|
67
|
+
grep -Eo '(^|[[:space:]])(>>?|tee([[:space:]]+-a)?|cat[[:space:]]+<<[^[:space:]]+[[:space:]]*>)[[:space:]]*[^[:space:];|&]+' |
|
|
68
|
+
sed -E 's/^[[:space:]]*(>>?|tee([[:space:]]+-a)?|cat[[:space:]]+<<[^[:space:]]+[[:space:]]*>)[[:space:]]*//; s/^[\"'\'']//; s/[\"'\'']$//'
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
if [[ "$COMMAND" =~ $inline_runtime_re ]] && inline_runtime_intends_to_write "$COMMAND"; then
|
|
72
|
+
while IFS= read -r token; do
|
|
73
|
+
is_tracked_file "$token" && return 0
|
|
74
|
+
done < <(git ls-files | while IFS= read -r file; do
|
|
75
|
+
[[ "$COMMAND" == *"$file"* ]] && printf '%s\n' "$file"
|
|
76
|
+
done)
|
|
77
|
+
fi
|
|
78
|
+
|
|
79
|
+
return 1
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if command_mentions_tracked_write; then
|
|
83
|
+
echo "Lisa notice: prefer Edit/Write for tracked file edits so lint-on-edit can see the change." >&2
|
|
84
|
+
fi
|
|
85
|
+
|
|
86
|
+
exit 0
|
|
@@ -4,17 +4,15 @@
|
|
|
4
4
|
# =============================================================================
|
|
5
5
|
# Lint-on-Edit Hook (PostToolUse - Write|Edit)
|
|
6
6
|
# =============================================================================
|
|
7
|
-
# Runs oxlint
|
|
8
|
-
#
|
|
9
|
-
# prettier → ast-grep → oxlint --fix → eslint --fix
|
|
7
|
+
# Runs oxlint on each edited TypeScript file. Full ESLint remains enforced at
|
|
8
|
+
# the commit/CI chokepoint via the project lint scripts.
|
|
10
9
|
#
|
|
11
|
-
# oxlint
|
|
12
|
-
#
|
|
13
|
-
# rules for ESLint to handle.
|
|
10
|
+
# oxlint is Rust-native and covers the fast-feedback rule tier in milliseconds;
|
|
11
|
+
# ESLint stays out of the edit-time path.
|
|
14
12
|
#
|
|
15
13
|
# Behavior:
|
|
16
|
-
# - Exit 0: lint passes
|
|
17
|
-
# - Exit 2:
|
|
14
|
+
# - Exit 0: lint passes
|
|
15
|
+
# - Exit 2: oxlint errors remain - blocks Claude so it fixes them immediately
|
|
18
16
|
#
|
|
19
17
|
# @see .claude/rules/verfication.md "Self-Correction Loop" section
|
|
20
18
|
# =============================================================================
|
|
@@ -49,7 +47,7 @@ esac
|
|
|
49
47
|
|
|
50
48
|
cd "$CLAUDE_PROJECT_DIR" || exit 0
|
|
51
49
|
|
|
52
|
-
# Resolve oxlint
|
|
50
|
+
# Resolve oxlint binary - prefer local node_modules/.bin
|
|
53
51
|
if [ -x "./node_modules/.bin/oxlint" ]; then
|
|
54
52
|
OXLINT_CMD="./node_modules/.bin/oxlint"
|
|
55
53
|
elif [ -f "bun.lockb" ] || [ -f "bun.lock" ]; then
|
|
@@ -62,19 +60,7 @@ else
|
|
|
62
60
|
OXLINT_CMD="npx oxlint"
|
|
63
61
|
fi
|
|
64
62
|
|
|
65
|
-
|
|
66
|
-
ESLINT_CMD="./node_modules/.bin/eslint"
|
|
67
|
-
elif [ -f "bun.lockb" ] || [ -f "bun.lock" ]; then
|
|
68
|
-
ESLINT_CMD="bunx eslint"
|
|
69
|
-
elif [ -f "pnpm-lock.yaml" ]; then
|
|
70
|
-
ESLINT_CMD="pnpm exec eslint"
|
|
71
|
-
elif [ -f "yarn.lock" ]; then
|
|
72
|
-
ESLINT_CMD="yarn exec eslint"
|
|
73
|
-
else
|
|
74
|
-
ESLINT_CMD="npx eslint"
|
|
75
|
-
fi
|
|
76
|
-
|
|
77
|
-
# 1) oxlint --fix (REQUIRED in the Phase 2 hybrid pipeline)
|
|
63
|
+
# oxlint (REQUIRED in the Phase 2 hybrid pipeline)
|
|
78
64
|
# If oxlint is missing the project is out of sync with the current Lisa
|
|
79
65
|
# governance — fail loudly rather than silently skipping. ESLint alone is
|
|
80
66
|
# no longer a complete lint pass.
|
|
@@ -89,46 +75,14 @@ if [ ! -f ".oxlintrc.json" ] && [ ! -f ".oxlintrc.jsonc" ] && [ ! -f "oxlint.con
|
|
|
89
75
|
exit 2
|
|
90
76
|
fi
|
|
91
77
|
|
|
92
|
-
echo "Running oxlint
|
|
93
|
-
OX_OUTPUT=$($OXLINT_CMD --
|
|
78
|
+
echo "Running oxlint on: $FILE_PATH"
|
|
79
|
+
OX_OUTPUT=$($OXLINT_CMD --quiet "$FILE_PATH" 2>&1)
|
|
94
80
|
OX_EXIT=$?
|
|
95
81
|
if [ $OX_EXIT -ne 0 ]; then
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
if [ $OX_EXIT -ne 0 ]; then
|
|
100
|
-
echo "oxlint found unfixable errors in: $FILE_PATH" >&2
|
|
101
|
-
echo "$OX_OUTPUT" >&2
|
|
102
|
-
exit 2
|
|
103
|
-
fi
|
|
104
|
-
fi
|
|
105
|
-
|
|
106
|
-
# 2) ESLint --fix --quiet --cache
|
|
107
|
-
# --quiet: suppress warnings, only show errors
|
|
108
|
-
# --cache: use ESLint cache for performance
|
|
109
|
-
# --rule: disable no-unused-vars auto-fix to prevent removing imports that Claude
|
|
110
|
-
# plans to use in a subsequent edit (pre-commit hook still catches them)
|
|
111
|
-
echo "Running ESLint --fix on: $FILE_PATH"
|
|
112
|
-
|
|
113
|
-
# First pass: attempt auto-fix
|
|
114
|
-
OUTPUT=$($ESLINT_CMD --fix --quiet --cache --rule '@typescript-eslint/no-unused-vars: off' "$FILE_PATH" 2>&1)
|
|
115
|
-
FIX_EXIT=$?
|
|
116
|
-
|
|
117
|
-
if [ $FIX_EXIT -eq 0 ]; then
|
|
118
|
-
echo "ESLint: No errors in $(basename "$FILE_PATH")"
|
|
119
|
-
exit 0
|
|
120
|
-
fi
|
|
121
|
-
|
|
122
|
-
# Auto-fix resolved some issues but errors remain — re-run to get remaining errors
|
|
123
|
-
OUTPUT=$($ESLINT_CMD --quiet --cache "$FILE_PATH" 2>&1)
|
|
124
|
-
LINT_EXIT=$?
|
|
125
|
-
|
|
126
|
-
if [ $LINT_EXIT -eq 0 ]; then
|
|
127
|
-
echo "ESLint: Auto-fixed all errors in $(basename "$FILE_PATH")"
|
|
128
|
-
exit 0
|
|
82
|
+
echo "oxlint found errors in: $FILE_PATH" >&2
|
|
83
|
+
echo "$OX_OUTPUT" >&2
|
|
84
|
+
exit 2
|
|
129
85
|
fi
|
|
130
86
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
echo "$OUTPUT" >&2
|
|
134
|
-
exit 2
|
|
87
|
+
echo "oxlint: No errors in $(basename "$FILE_PATH")"
|
|
88
|
+
exit 0
|