ResourcesRetries
resources/require-bounded-retries
Retries need a finite attempt count, elapsed-time limit, or deadline; cancellation alone does not guarantee a bound.
01 Examples
TypeScript
while (true) { try { return await request(); } catch {} }Finding
Require a finite bound on retry behavior.
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-bounded-retries": "warn"- Package
@scruple/resources- Default threshold
- 0.9
- Minimum confidence
- 0.7