Skip to content
Critiq Docs

Search docs

Search documentation pages and rules

performance.cpu

Avoid JSON parse/stringify deep-clone

JSON stringify/parse cloning is expensive and loses type fidelity for rich objects.

#Metadata

Rule ID
ts.performance.no-json-parse-stringify-clone
Severity
medium
Confidence
0.8
Languages
javascript, typescript
Presets
recommended, strict
Stability
stable
Applies to
block
Tags
performance, rules-catalog

#Why it matters

JSON stringify/parse cloning is expensive and loses type fidelity for rich objects.

#Remediation

Refactor this path to avoid repeated work in hot execution paths.

#Repository path

The generated metadata points to critiq-rules/libs/rules/catalog/rules/typescript/ts.performance.no-json-parse-stringify-clone.rule.yaml.