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