Skip to content
Critiq Docs

Search docs

Search documentation pages and rules

correctness.language

Duplicate keys in object literal

An object literal repeats the same static property name.

#Metadata

Rule ID
ts.correctness.duplicate-object-key
Severity
medium
Confidence
0.95
Languages
javascript, typescript
Presets
recommended, strict
Stability
stable
Applies to
file
Tags
correctness, crq-cor-018, language, public-directory-parity, rules-catalog

#Why it matters

Later entries silently override earlier ones, hiding bugs during refactors.

#Remediation

Merge the values or delete the redundant property so each key is declared once.

#Repository path

The generated metadata points to critiq-rules/libs/rules/catalog/rules/typescript/ts.correctness.duplicate-object-key.rule.yaml.