VBC-201: redundant-async
warningCategory: clean-code
Analysis: AST
File types: .ts, .tsx, .js, .jsx
Tags: clean-code performance
What it reports
async function with no await at line {line}. The async keyword only wraps the return value in a Promise here; drop it or await something.
Flagged
ts
async function load() {
return cached;
}Not flagged
ts
async function load() {
return await fetchIt();
}ts
function load() {
return cached;
}ts
const spy = vi.fn(async (name) => undefined);AST check
- Type:
async-without-await