this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Scope pre-commit eslint to staged files only

The hook was linting the entire web app when any file under
apps/web/src/ was staged, failing on pre-existing errors in
unrelated components. Now only staged files are passed to eslint.

+5 -2
+5 -2
tools/pre-commit.sh
··· 19 19 cargo check --target wasm32-unknown-unknown -p opake-core 20 20 fi 21 21 22 - # Web frontend checks (only if web/ files are staged) 22 + # Web frontend checks (only staged files under apps/web/src/) 23 23 if git diff --cached --name-only | grep -q '^apps/web/src/'; then 24 - (cd apps/web && bun run format:check && bun run lint) 24 + STAGED_WEB=$(git diff --cached --name-only --diff-filter=d | grep '^apps/web/src/' | sed 's|^apps/web/||') 25 + if [ -n "$STAGED_WEB" ]; then 26 + (cd apps/web && bun run format:check && bunx eslint $STAGED_WEB) 27 + fi 25 28 fi