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+ # SPDX-License-Identifier: PMPL-1.0-or-later
2+ name : NPM/Bun Blocker
3+ on : [push, pull_request]
4+
5+ permissions :
6+ contents : read
7+
8+ jobs :
9+ check :
10+ runs-on : ubuntu-latest
11+ permissions :
12+ contents : read
13+ steps :
14+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
15+ - name : Block npm/bun
16+ run : |
17+ if [ -f "package-lock.json" ] || [ -f "bun.lockb" ] || [ -f ".npmrc" ]; then
18+ echo "❌ npm/bun artifacts detected. Use Deno instead."
19+ exit 1
20+ fi
21+ echo "✅ No npm/bun violations"
Original file line number Diff line number Diff line change 1+ # SPDX-License-Identifier: PMPL-1.0-or-later
2+ name : TypeScript/JavaScript Blocker
3+ on : [push, pull_request]
4+
5+ permissions :
6+ contents : read
7+
8+ jobs :
9+ check :
10+ runs-on : ubuntu-latest
11+ permissions :
12+ contents : read
13+ steps :
14+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
15+ - name : Block new TypeScript/JavaScript
16+ run : |
17+ NEW_TS=$(git diff --name-only --diff-filter=A HEAD~1 2>/dev/null | grep -E '\.(ts|tsx)$' | grep -v '\.gen\.' || true)
18+ 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)
19+
20+ if [ -n "$NEW_TS" ] || [ -n "$NEW_JS" ]; then
21+ echo "❌ New TS/JS files detected. Use ReScript instead."
22+ [ -n "$NEW_TS" ] && echo "$NEW_TS"
23+ [ -n "$NEW_JS" ] && echo "$NEW_JS"
24+ exit 1
25+ fi
26+ echo "✅ ReScript policy enforced"
You can’t perform that action at this time.
0 commit comments