File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,11 +23,29 @@ jobs:
2323
2424 - name : Check for TypeScript
2525 run : |
26- if find . -name "*.ts" -o -name "*.tsx" | grep -v node_modules | grep -q .; then
27- echo "::error::TypeScript files found! Use ReScript instead (per RSR policy)"
26+ # Allowlist (TS legitimate as a bridge/adapter to a non-ReScript ecosystem):
27+ # bindings/ - language bindings (Deno/TS/AssemblyScript FFI to ReScript core)
28+ # *.d.ts - TypeScript type declarations for ReScript FFI
29+ # tests/, test/ - Deno test runners verifying ReScript output
30+ # scripts/ - Deno build scripts (bundle, dev-server, etc.)
31+ # mcp-adapter/ - MCP server adapters (MCP protocol is Deno/TS-typed by spec)
32+ # vscode/ - VSCode extensions (TS is the ecosystem default)
33+ TS_FILES=$(find . \( -name "*.ts" -o -name "*.tsx" \) \
34+ | grep -v node_modules \
35+ | grep -v '/bindings/' \
36+ | grep -v '\.d\.ts$' \
37+ | grep -v '/tests/' \
38+ | grep -v '/test/' \
39+ | grep -v '/scripts/' \
40+ | grep -v '/mcp-adapter/' \
41+ | grep -v '/vscode/' \
42+ || true)
43+ if [ -n "$TS_FILES" ]; then
44+ echo "❌ TypeScript files detected - use ReScript instead"
45+ echo "$TS_FILES"
2846 exit 1
2947 fi
30- echo "✓ No TypeScript files found "
48+ echo "✅ No TypeScript files outside allowlisted bridge/adapter paths "
3149
3250 - name : Check for Go
3351 run : |
You can’t perform that action at this time.
0 commit comments