Skip to content

Commit 083a2ae

Browse files
autofix-ci[bot]camchenry
authored andcommitted
[autofix.ci] apply automated fixes
1 parent ce0891b commit 083a2ae

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

cmd/tsgolint/payload.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type headlessConfig struct {
2828
}
2929

3030
type headlessRule struct {
31-
Name string `json:"name"`
31+
Name string `json:"name"`
3232
Options any `json:"options,omitempty"`
3333
}
3434

e2e/snapshot.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,10 @@ describe('TSGoLint E2E Snapshot Tests', () => {
210210
name: 'no-floating-promises',
211211
options: { ignoreVoid },
212212
},
213-
]
214-
}
213+
],
214+
},
215215
],
216-
})
216+
});
217217

218218
let output: Buffer;
219219
output = execFileSync(TSGOLINT_BIN, ['headless'], {

internal/rules/no_floating_promises/no_floating_promises.go

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
package no_floating_promises
22

33
import (
4-
"encoding/json"
5-
4+
"github.com/go-json-experiment/json"
65
"github.com/microsoft/typescript-go/shim/ast"
76
"github.com/microsoft/typescript-go/shim/checker"
87
"github.com/microsoft/typescript-go/shim/scanner"
@@ -11,13 +10,13 @@ import (
1110
)
1211

1312
type NoFloatingPromisesOptions struct {
14-
AllowForKnownSafeCalls []utils.TypeOrValueSpecifier
15-
AllowForKnownSafeCallsInline []string
16-
AllowForKnownSafePromises []utils.TypeOrValueSpecifier
17-
AllowForKnownSafePromisesInline []string
18-
CheckThenables *bool
19-
IgnoreIIFE *bool
20-
IgnoreVoid *bool
13+
AllowForKnownSafeCalls []utils.TypeOrValueSpecifier `json:"allowForKnownSafeCalls"`
14+
AllowForKnownSafeCallsInline []string `json:"allowForKnownSafeCallsInline"`
15+
AllowForKnownSafePromises []utils.TypeOrValueSpecifier `json:"allowForKnownSafePromises"`
16+
AllowForKnownSafePromisesInline []string `json:"allowForKnownSafePromisesInline"`
17+
CheckThenables *bool `json:"checkThenables"`
18+
IgnoreIIFE *bool `json:"ignoreIIFE"`
19+
IgnoreVoid *bool `json:"ignoreVoid"`
2120
}
2221

2322
// parseNoFloatingPromisesOptions converts a loosely-typed options value into a

0 commit comments

Comments
 (0)