H3 · H30010
Drop the event argument from H3 v2 response helpers
Flags redirect(), noContent(), html(), and iterable() called with the event as their first argument.
Run this rule
pnpm vite-doctor . --rules h3/response/no-event-first-arg
Why it matters
H3 v2 response helpers build a response value and no longer take the event. Passing it shifts every argument: redirect(event, "/login") uses the event as the location, and html(event, markup) renders the event instead of the markup.
Recommended fix
Drop the event argument and return the helper's result, such as return redirect("/login").
Useful links
Example
Return the helper without the event
Before
export default defineHandler((event) => {
return redirect(event, "/login")
})
After
export default defineHandler(() => {
return redirect("/login")
})