Skip to content

Commit e81fce6

Browse files
committed
ci(antipattern): broaden TS allowlist (cli/, mod.ts, lsp-server, *vscode*, deno-*)
1 parent f918358 commit e81fce6

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

.github/workflows/rsr-antipattern.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,16 @@ jobs:
2727
- name: Check for TypeScript
2828
run: |
2929
# 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)
30+
# bindings/ - language bindings (Deno/TS/AssemblyScript FFI)
31+
# *.d.ts - TypeScript type declarations for ReScript FFI
32+
# tests/, test/ - Deno test runners
33+
# scripts/ - Deno build scripts
34+
# mcp-adapter/ - MCP server adapters (MCP is Deno/TS-typed by spec)
35+
# *vscode* - VSCode extensions (TS is the ecosystem default)
36+
# cli/ - CLI entry points (Deno scripts)
37+
# mod.ts - canonical Deno module entrypoint
38+
# *lsp-server.ts, *lsp.ts - Language Server Protocol implementations
39+
# deno-*/ - subprojects explicitly named for Deno
3640
TS_FILES=$(find . \( -name "*.ts" -o -name "*.tsx" \) \
3741
| grep -v node_modules \
3842
| grep -v '/bindings/' \
@@ -41,7 +45,12 @@ jobs:
4145
| grep -v '/test/' \
4246
| grep -v '/scripts/' \
4347
| grep -v '/mcp-adapter/' \
44-
| grep -v '/vscode/' \
48+
| grep -Ev '/[^/]*vscode[^/]*/' \
49+
| grep -v '/cli/' \
50+
| grep -v '/mod\.ts$' \
51+
| grep -Ev 'lsp[-_]?server\.ts$' \
52+
| grep -Ev '[/-]lsp\.ts$' \
53+
| grep -Ev '/deno-[^/]+/' \
4554
|| true)
4655
if [ -n "$TS_FILES" ]; then
4756
echo "❌ TypeScript files detected - use ReScript instead"

0 commit comments

Comments
 (0)