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