Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

next
yml 28 lines 688 Bytes
Raw
1 id: ts-double-assertion
2 language: Tsx
3 severity: error
4 message: Parse or narrow the value instead of casting through unknown or any.
5 files: ['ts/packages/**', 'ts/scripts/**', 'scripts/**', '.github/scripts/**']
6 ignores:
7 - '**/node_modules/**'
8 - '**/dist/**'
9 - '**/generated/**'
10 - '**/.generated/**'
11 - '**/pack/**'
12 - '**/*.d.ts'
13 - '**/*.test.*'
14 - '**/*.spec.*'
15 - '**/__tests__/**'
16 - '**/test/**'
17 - '**/tests/**'
18 rule:
19 kind: as_expression
20 has:
21 any:
22 - pattern: $VALUE as unknown
23 - pattern: $VALUE as any
24 - kind: parenthesized_expression
25 has:
26 any:
27 - pattern: $VALUE as unknown
28 - pattern: $VALUE as any