Skip to content
← All rules
AsyncConcurrency

async/no-serial-independent-work

Independent operations that do not rely on ordering, shared state, transactions, locks, or rate limits should begin together.

awaitperformanceparallelism
TypeScript
const user = await getUser(id); const flags = await getFlags(id);
Finding

Do not run independent awaits in series.

Setup

Install the package, register its plugin factory, then enable the rule.

Install the package

pnpm add -D @scruple/async

Register the plugin

In scruple.config.ts, register the factory under the async namespace used by the rule ID.

import { asyncRules } from "@scruple/async";

plugins: {
  "async": asyncRules(),
},

Enable the rule

"async/no-serial-independent-work": "warn"
Package
@scruple/async
Default threshold
0.9
Minimum confidence
0.7

Released under the MIT License.