Skip to content

Require Async Suffix

Error
small-rules/require-async-suffix

Require async function names to end with Async.

Diagnostic Messages

missingAsyncSuffix
Async functions must have names that end with Async.

Configuration

This rule accepts one options object after the severity.

exceptOptional

No description available.

{
"jsPlugins": [
"@pobammer-ts/small-rules"
],
"rules": {
"small-rules/require-async-suffix": [
"error",
{
"except": [
"value"
]
}
]
}
}

Examples

Missing Async suffix
async function getAll(): Promise<string> {
return "value";
}
Async function suffix
async function getAllAsync(): Promise<string> {
return "value";
}