ESLint plugin that flags and auto-fixes usage of `await` inside `Promise.all`, `Promise.race`, `Promise.allSettled`, and `Promise.any` callbacks. Version 3.0.1 requires ESLint ≥9 and Node ≥20, ships TypeScript types, and uses ESM flat config exclusively (no legacy `.eslintrc` support). Differentiates from generic promise linters by focusing solely on this footgun pattern, providing a single highly specific rule with a recommended config and automatic fix.
npm install eslint-plugin-no-await-in-promiseVerified import paths — ran on the pinned version, not inferred.
Demonstrates flat config usage with recommended config and explicit rule override; shows the pattern the rule flags and the fix.
Upgrade to at least ESLint 9 and Node 20. Use flat config: `import plugin from 'eslint-plugin-no-await-in-promise'; export default [plugin.configs.recommended];`
Use `import` syntax and ensure your project's `package.json` has `"type": "module"` or use `.mjs` extension.
Review helper functions manually or combine with other lint rules (e.g., no-async-promise-executor).
Verify the fix manually; consider extracting the awaited promise outside the Promise.all call.
Switch to import: `import noAwaitInPromise from 'eslint-plugin-no-await-in-promise'`
Install: `npm install eslint-plugin-no-await-in-promise --save-dev`
Use numeric severity: `'no-await-in-promise/no-await-in-promise': 'error'` or `['error']`