Skip to content

Commit 5a40f08

Browse files
ci(antipattern): allowlist legit TS bridge/adapter paths (#23)
Same fleet-wide patch as stapeln#24 / rsr-template-repo#30. Broadens TS exclusion list (bindings/, tests/, test/, scripts/, mcp-adapter/, vscode/).
1 parent acbe88a commit 5a40f08

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

.github/workflows/rsr-antipattern.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,29 @@ jobs:
2626

2727
- name: Check for TypeScript
2828
run: |
29-
# Exclude bindings/deno/ - those are Deno FFI files using Deno.dlopen, not plain TypeScript
30-
# Exclude .d.ts files - those are TypeScript type declarations for ReScript FFI
31-
TS_FILES=$(find . \( -name "*.ts" -o -name "*.tsx" \) | grep -v node_modules | grep -v 'bindings/deno' | grep -v '\.d\.ts$' || true)
29+
# Allowlist (TS legitimate as a bridge/adapter to a non-ReScript ecosystem):
30+
# bindings/ - language bindings (Deno/TS/AssemblyScript FFI to ReScript core)
31+
# *.d.ts - TypeScript type declarations for ReScript FFI
32+
# tests/, test/ - Deno test runners verifying ReScript output
33+
# scripts/ - Deno build scripts (bundle, dev-server, etc.)
34+
# mcp-adapter/ - MCP server adapters (MCP protocol is Deno/TS-typed by spec)
35+
# vscode/ - VSCode extensions (TS is the ecosystem default)
36+
TS_FILES=$(find . \( -name "*.ts" -o -name "*.tsx" \) \
37+
| grep -v node_modules \
38+
| grep -v '/bindings/' \
39+
| grep -v '\.d\.ts$' \
40+
| grep -v '/tests/' \
41+
| grep -v '/test/' \
42+
| grep -v '/scripts/' \
43+
| grep -v '/mcp-adapter/' \
44+
| grep -v '/vscode/' \
45+
|| true)
3246
if [ -n "$TS_FILES" ]; then
3347
echo "❌ TypeScript files detected - use ReScript instead"
3448
echo "$TS_FILES"
3549
exit 1
3650
fi
37-
echo "✅ No TypeScript files (Deno FFI bindings excluded)"
51+
echo "✅ No TypeScript files outside allowlisted bridge/adapter paths"
3852
3953
- name: Check for Go
4054
run: |

0 commit comments

Comments
 (0)