forked from Qortal/q-blog
53 lines
843 B
Bash
Executable File
53 lines
843 B
Bash
Executable File
#!/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 1–3 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
|