Use top-levelDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/sindresorhus/eslint-plugin-unicorn/llms.txt
Use this file to discover all available pages before exploring further.
await in ES modules instead of wrapping async code in an IIFE or a named async function that is immediately called. Top-level await is more readable and lets the runtime surface unhandled rejections reliably.
| Recommended | ✅ recommended · ☑️ unopinionated |
| Suggestions | 💡 Has suggestions |
.cjs files are ignored by this rule.- Promise chains —
.then(),.catch(), or.finally()called directly on a promise. - Async IIFEs —
(async () => { … })(). - Named async function calls —
async function main() { … }; main().