Skip to content
Critiq Docs

Search docs

Search documentation pages and rules

correctness

Infinite Loop

Detect obvious infinite loops

#Metadata

Rule ID
ts.correctness.infinite-loop
Severity
high
Confidence
0.85
Languages
javascript, typescript
Presets
recommended, strict
Stability
stable
Applies to
block
Tags
correctness, rules-catalog

#Why it matters

Detect obvious infinite loops:while (true) and for(;;) without break, return, or throw in the loop body.

#Remediation

Detect obvious infinite loops:while (true) and for(;;) without break, return, or throw in the loop body.

#Repository path

The generated metadata points to critiq-rules/libs/rules/catalog/rules/typescript/ts.correctness.infinite-loop.rule.yaml.