Warns when declaring async functions and suggests using Effect values and Effect.gen for async control flow
| Property | Value |
|---|---|
| Category | Effect-native |
| Default severity | off |
| Fixable | No |
| Effect versions | v3, v4 |
| Diagnostic codes | TS377081 |
| Language Service name | asyncFunction |
| Oxlint name | effecttsgo/async-function |
export const preview = async () => {
/**
^^^^^^^^^^^^^ effecttsgo(async-function): This code declares an async function, consider representing this async control flow with Effect values and `Effect.gen`.
*/
await Promise.resolve(1)
}See the Language Service setup guide for installation instructions.
See the Oxlint setup guide for installation and patching instructions.
{
"$schema": "./node_modules/@effect/tsgo/oxlint-schema.json",
"options": {
"typeAware": true
},
"plugins": ["effecttsgo"],
"rules": {
"effecttsgo/async-function": "warn"
}
}
{ "$schema": "./node_modules/@effect/tsgo/schema.json", "compilerOptions": { "plugins": [ { "name": "@effect/language-service", "diagnosticSeverity": { "asyncFunction": "warning" } } ] } }