File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Project Instructions
2+
3+ ## Language Policy (RSR)
4+
5+ - ** REQUIRED** : ReScript for all JS-target code
6+ - ** FORBIDDEN** : New TypeScript/JavaScript files
7+ - ** ALLOWED** : Generated .res.js files
Original file line number Diff line number Diff line change 1+ name : TypeScript/JavaScript Blocker
2+ on : [push, pull_request]
3+ jobs :
4+ check :
5+ runs-on : ubuntu-latest
6+ steps :
7+ - uses : actions/checkout@v4
8+ - name : Block new TypeScript/JavaScript
9+ run : |
10+ NEW_TS=$(git diff --name-only --diff-filter=A HEAD~1 2>/dev/null | grep -E '\.(ts|tsx)$' | grep -v '\.gen\.' || true)
11+ NEW_JS=$(git diff --name-only --diff-filter=A HEAD~1 2>/dev/null | grep -E '\.(js|jsx)$' | grep -v '\.res\.js$' | grep -v '\.gen\.' | grep -v 'node_modules' || true)
12+
13+ if [ -n "$NEW_TS" ] || [ -n "$NEW_JS" ]; then
14+ echo "❌ New TS/JS files detected. Use ReScript instead."
15+ [ -n "$NEW_TS" ] && echo "$NEW_TS"
16+ [ -n "$NEW_JS" ] && echo "$NEW_JS"
17+ exit 1
18+ fi
19+ echo "✅ ReScript policy enforced"
You can’t perform that action at this time.
0 commit comments