ResourcesRetries
resources/require-retry-time-budget
Retries need a total elapsed deadline or inherited deadline-backed context; attempt limits and arbitrary cancellation signals are not total budgets.
01 Examples
TypeScript
await retry(request, { attempts: 5 });Finding
Require an overall deadline for retry work.
02 Enable it
Setup
Install the package, register its plugin factory, then enable the rule.
Install the package
pnpm add -D @scruple/resourcesRegister 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-time-budget": "warn"- Package
@scruple/resources- Default threshold
- Plugin default
- Minimum confidence
- Plugin default