- Add scripts/lint-staged.js to run oxlint on staged files - Extend format-staged.js to include ui/src/ directory - Update pre-commit hook to run both format and lint checks The pre-commit hook now blocks commits if there are linting errors, catching issues like unused imports before they land.
10 lines
223 B
Bash
Executable File
10 lines
223 B
Bash
Executable File
#!/bin/sh
|
|
ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
|
|
[ -z "$ROOT" ] && exit 0
|
|
|
|
# Format staged files
|
|
node "$ROOT/scripts/format-staged.js" || exit 1
|
|
|
|
# Lint staged files
|
|
node "$ROOT/scripts/lint-staged.js" || exit 1
|