Files
q-blog/scripts/dev/apply-phase0-lint.sh
2025-08-16 22:15:29 -04:00

53 lines
843 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
set -euo pipefail
MODE="${1:-phase0}"
PHASE0_CONTENT="$(cat <<'EOF'
# Phase 0: limit lint to harness/docs/scripts; app code will be addressed in Phase 13 sweeps.
node_modules/
dist/
coverage/
.vite/
.gitea/
# Ignore full app sources during Phase 0
src/**
# Type definitions are not linted
**/*.d.ts
# Build artifacts & caches
*.log
EOF
)"
FULL_CONTENT="$(cat <<'EOF'
node_modules/
dist/
coverage/
.vite/
.gitea/
**/*.d.ts
*.log
EOF
)"
case "$MODE" in
phase0)
echo "$PHASE0_CONTENT" > .eslintignore
echo "Applied Phase 0 lint scope (src/** ignored)."
;;
full)
echo "$FULL_CONTENT" > .eslintignore
echo "Applied FULL lint scope (src/** included)."
;;
*)
echo "Usage: $0 [phase0|full]" >&2
exit 1
;;
esac
# Show effective ignore
echo "== .eslintignore =="
cat .eslintignore