Files
dotfiles/.claude/hooks/stop-lint-gate.sh
Ismo Vuorinen be57181cdd fix: resolve shell startup errors and streamline tool management
- Guard brew shellenv in fish config with test -x for Linux compat
- Pin Python to 3.13 with compile=true (freethreaded builds broken)
- Pin neovim, go, terraform, aws-cli, cmake, dotnet-ef to stable versions
- Remove hugo and gdu from mise (unused / broken upstream)
- Comment out pipx-backed tools (mise can't find uvx when self-managed)
- Move mise [settings] above [tools] with pipx.uvx=true
- Fix dnf group name for dnf5 (development-tools lowercase)
- Remove vendored fzf binary (now managed by mise)
- Simplify Dotbot: force-relink mise config, targeted ~/.local clean,
  remove fzf custom linking (now via standard ~/.config/ glob)
- Fix lint gate hook to find yarn via mise shims
2026-03-21 22:05:51 +02:00

22 lines
508 B
Bash
Executable File

#!/usr/bin/env bash
# Stop gate: run yarn lint before Claude finishes.
# Exit 2 sends feedback back and keeps Claude working.
cd "$CLAUDE_PROJECT_DIR" || exit 0
# Ensure node/yarn are on PATH via mise
eval "$(mise activate bash --shims)" 2> /dev/null
node_dir="$(mise where node 2> /dev/null)/bin"
[ -d "$node_dir" ] && export PATH="$node_dir:$PATH"
output=$(yarn lint 2>&1)
status=$?
if [ $status -ne 0 ]; then
echo "Lint failed — fix before finishing:" >&2
echo "$output" >&2
exit 2
fi
exit 0