Skip to content

Commit 436717a

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

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
@@ -24,12 +24,16 @@ jobs:
2424
- name: Check for TypeScript
2525
run: |
2626
# Allowlist (TS legitimate as a bridge/adapter to a non-ReScript ecosystem):
27-
# bindings/ - language bindings (Deno/TS/AssemblyScript FFI to ReScript core)
28-
# *.d.ts - TypeScript type declarations for ReScript FFI
29-
# tests/, test/ - Deno test runners verifying ReScript output
30-
# scripts/ - Deno build scripts (bundle, dev-server, etc.)
31-
# mcp-adapter/ - MCP server adapters (MCP protocol is Deno/TS-typed by spec)
32-
# vscode/ - VSCode extensions (TS is the ecosystem default)
27+
# bindings/ - language bindings (Deno/TS/AssemblyScript FFI)
28+
# *.d.ts - TypeScript type declarations for ReScript FFI
29+
# tests/, test/ - Deno test runners
30+
# scripts/ - Deno build scripts
31+
# mcp-adapter/ - MCP server adapters (MCP is Deno/TS-typed by spec)
32+
# *vscode* - VSCode extensions (TS is the ecosystem default)
33+
# cli/ - CLI entry points (Deno scripts)
34+
# mod.ts - canonical Deno module entrypoint
35+
# *lsp-server.ts, *lsp.ts - Language Server Protocol implementations
36+
# deno-*/ - subprojects explicitly named for Deno
3337
TS_FILES=$(find . \( -name "*.ts" -o -name "*.tsx" \) \
3438
| grep -v node_modules \
3539
| grep -v '/bindings/' \
@@ -38,7 +42,12 @@ jobs:
3842
| grep -v '/test/' \
3943
| grep -v '/scripts/' \
4044
| grep -v '/mcp-adapter/' \
41-
| grep -v '/vscode/' \
45+
| grep -Ev '/[^/]*vscode[^/]*/' \
46+
| grep -v '/cli/' \
47+
| grep -v '/mod\.ts$' \
48+
| grep -Ev 'lsp[-_]?server\.ts$' \
49+
| grep -Ev '[/-]lsp\.ts$' \
50+
| grep -Ev '/deno-[^/]+/' \
4251
|| true)
4352
if [ -n "$TS_FILES" ]; then
4453
echo "❌ TypeScript files detected - use ReScript instead"

0 commit comments

Comments
 (0)