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 708 Bytes
Raw
1 id: ts-empty-catch
2 language: Tsx
3 severity: error
4 message: Handle or propagate the error; an empty catch silently discards it.
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 any:
20 - pattern:
21 context: 'try {} catch {}'
22 selector: catch_clause
23 - pattern:
24 context: 'try {} catch ($ERROR) {}'
25 selector: catch_clause
26 - pattern:
27 context: 'try {} catch ($ERROR: $TYPE) {}'
28 selector: catch_clause