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