Skip to content

Commit 3757dd1

Browse files
committed
fix: all js linter warnings
Signed-off-by: Christian Stewart <[email protected]>
1 parent dd64ee6 commit 3757dd1

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

gs/fmt/fmt.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { describe, it, expect, beforeEach, vi } from 'vitest'
1+
import { describe, it, expect } from 'vitest'
22
import * as fmt from './fmt.js'
33

44
// Helper to capture stdout via internal stdout.write

gs/fmt/fmt.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,19 +99,25 @@ function defaultFormat(value: any): string {
9999
) {
100100
try {
101101
return (value as any).GoString()
102-
} catch {}
102+
} catch {
103+
// Ignore error by continuing to next case.
104+
}
103105
}
104106
// Prefer error interface if present
105107
if ((value as any).Error && typeof (value as any).Error === 'function') {
106108
try {
107109
return (value as any).Error()
108-
} catch {}
110+
} catch {
111+
// Ignore error by continuing to next case.
112+
}
109113
}
110114
// Check for Stringer interface
111115
if ((value as any).String && typeof (value as any).String === 'function') {
112116
try {
113117
return (value as any).String()
114-
} catch {}
118+
} catch {
119+
// Ignore error by continuing to next case.
120+
}
115121
}
116122
// Basic Map/Set rendering
117123
if (value instanceof Map) {

0 commit comments

Comments
 (0)