Skip to content
← All rules
ResourcesRetries

resources/require-retry-backoff-with-jitter

Retry timing should combine progressively increasing delays with randomization rather than retrying immediately or at a fixed cadence.

retrybackoffjitter
TypeScript
await retry(request, { delayMs: 100 });
Finding

Require retry backoff with jitter.

Setup

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

Install the package

pnpm add -D @scruple/resources

Register the plugin

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

import { resources } from "@scruple/resources";

plugins: {
  "resources": resources(),
},

Enable the rule

"resources/require-retry-backoff-with-jitter": "warn"
Package
@scruple/resources
Default threshold
Plugin default
Minimum confidence
Plugin default

Released under the MIT License.