Functions that return boolean | Promise<boolean> are not allowed to use boolean prefixes on v73.0.0:
async function compute<IN, OUT>(
input: IN,
callable: (input: IN) => OUT | Promise<OUT>,
// unicorn/consistent-boolean-name reports an error on the "should" prefix, and I believe that's incorrect
shouldDoSomethingAfter: (input: IN) => boolean | Promise<boolean>,
): Promise<OUT> {
const result = await callable(input);
if (await shouldDoSomethingAfter(input)) {
// ...
}
return result;
}
Functions that return
boolean | Promise<boolean>are not allowed to use boolean prefixes on v73.0.0: