Skip to content

Commit b9e1a56

Browse files
ci(antipattern): broaden TS allowlist (cli/, mod.ts, lsp-server, *vscode*, deno-*) (#4)
1 parent 0b1e9c6 commit b9e1a56

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
@@ -18,12 +18,16 @@ jobs:
1818
- name: Check for TypeScript
1919
run: |
2020
# Allowlist (TS legitimate as a bridge/adapter to a non-ReScript ecosystem):
21-
# bindings/ - language bindings (Deno/TS/AssemblyScript FFI to ReScript core)
22-
# *.d.ts - TypeScript type declarations for ReScript FFI
23-
# tests/, test/ - Deno test runners verifying ReScript output
24-
# scripts/ - Deno build scripts (bundle, dev-server, etc.)
25-
# mcp-adapter/ - MCP server adapters (MCP protocol is Deno/TS-typed by spec)
26-
# vscode/ - VSCode extensions (TS is the ecosystem default)
21+
# bindings/ - language bindings (Deno/TS/AssemblyScript FFI)
22+
# *.d.ts - TypeScript type declarations for ReScript FFI
23+
# tests/, test/ - Deno test runners
24+
# scripts/ - Deno build scripts
25+
# mcp-adapter/ - MCP server adapters (MCP is Deno/TS-typed by spec)
26+
# *vscode* - VSCode extensions (TS is the ecosystem default)
27+
# cli/ - CLI entry points (Deno scripts)
28+
# mod.ts - canonical Deno module entrypoint
29+
# *lsp-server.ts, *lsp.ts - Language Server Protocol implementations
30+
# deno-*/ - subprojects explicitly named for Deno
2731
TS_FILES=$(find . \( -name "*.ts" -o -name "*.tsx" \) \
2832
| grep -v node_modules \
2933
| grep -v '/bindings/' \
@@ -32,7 +36,12 @@ jobs:
3236
| grep -v '/test/' \
3337
| grep -v '/scripts/' \
3438
| grep -v '/mcp-adapter/' \
35-
| grep -v '/vscode/' \
39+
| grep -Ev '/[^/]*vscode[^/]*/' \
40+
| grep -v '/cli/' \
41+
| grep -v '/mod\.ts$' \
42+
| grep -Ev 'lsp[-_]?server\.ts$' \
43+
| grep -Ev '[/-]lsp\.ts$' \
44+
| grep -Ev '/deno-[^/]+/' \
3645
|| true)
3746
if [ -n "$TS_FILES" ]; then
3847
echo "❌ TypeScript files detected - use ReScript instead"

0 commit comments

Comments
 (0)