feat: enable type-aware no-floating-promises rule, fix all 177 violations (#22741)
This commit is contained in:
@@ -100,7 +100,7 @@ export function BasicTool(props: BasicToolProps) {
|
||||
if (isOpen) {
|
||||
contentRef.style.overflow = "hidden"
|
||||
heightAnim = animate(contentRef, { height: "auto" }, SPRING)
|
||||
heightAnim.finished.then(() => {
|
||||
void heightAnim.finished.then(() => {
|
||||
if (!contentRef || !open()) return
|
||||
contentRef.style.overflow = "visible"
|
||||
contentRef.style.height = "auto"
|
||||
|
||||
@@ -107,7 +107,7 @@ export function List<T>(props: ListProps<T> & { ref?: (ref: ListRef) => void })
|
||||
// Force a refetch even if the value is unchanged.
|
||||
// This is important for programmatic changes like Tab completion.
|
||||
if (prev === value) {
|
||||
refetch()
|
||||
void refetch()
|
||||
return
|
||||
}
|
||||
queueMicrotask(() => refetch())
|
||||
|
||||
@@ -1158,7 +1158,7 @@ export function UserMessageDisplay(props: { message: UserMessage; parts: PartTyp
|
||||
onMouseDown={(e) => e.preventDefault()}
|
||||
onClick={(event) => {
|
||||
event.stopPropagation()
|
||||
handleCopy()
|
||||
void handleCopy()
|
||||
}}
|
||||
aria-label={copied() ? i18n.t("ui.message.copied") : i18n.t("ui.message.copyMessage")}
|
||||
/>
|
||||
|
||||
@@ -6,7 +6,8 @@ import { IconButton } from "./icon-button"
|
||||
import { Tooltip } from "./tooltip"
|
||||
|
||||
export interface TextFieldProps
|
||||
extends ComponentProps<typeof Kobalte.Input>,
|
||||
extends
|
||||
ComponentProps<typeof Kobalte.Input>,
|
||||
Partial<
|
||||
Pick<
|
||||
ComponentProps<typeof Kobalte>,
|
||||
@@ -75,7 +76,7 @@ export function TextField(props: TextFieldProps) {
|
||||
}
|
||||
|
||||
function handleClick() {
|
||||
if (local.copyable) handleCopy()
|
||||
if (local.copyable) void handleCopy()
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -102,7 +102,7 @@ export function TextReveal(props: {
|
||||
requestAnimationFrame(() => setState("ready", true))
|
||||
return
|
||||
}
|
||||
fonts.ready.finally(() => {
|
||||
void fonts.ready.finally(() => {
|
||||
widen(win())
|
||||
requestAnimationFrame(() => setState("ready", true))
|
||||
})
|
||||
|
||||
@@ -442,7 +442,7 @@ function AnimatedHeading(props) {
|
||||
|
||||
onMount(() => {
|
||||
measure()
|
||||
document.fonts?.ready.finally(() => {
|
||||
void document.fonts?.ready.finally(() => {
|
||||
measure()
|
||||
requestAnimationFrame(() => setState("ready", true))
|
||||
})
|
||||
|
||||
@@ -128,7 +128,7 @@ export function ToolErrorCard(props: ToolErrorCardProps) {
|
||||
onMouseDown={(e) => e.preventDefault()}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
copy()
|
||||
void copy()
|
||||
}}
|
||||
aria-label={copied() ? i18n.t("ui.message.copied") : i18n.t("ui.toolErrorCard.copyError")}
|
||||
/>
|
||||
|
||||
@@ -86,7 +86,7 @@ export function ToolStatusTitle(props: {
|
||||
finish()
|
||||
return
|
||||
}
|
||||
fonts.ready.finally(() => {
|
||||
void fonts.ready.finally(() => {
|
||||
measure()
|
||||
finish()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user