Skip to content
Critiq Docs

Search docs

Search documentation pages and rules

correctness.language

this used before super()

Do not use this or super members before calling super() in a subclass constructor.

#Metadata

Rule ID
ts.correctness.this-before-super
Severity
high
Confidence
0.95
Languages
javascript, typescript
Presets
recommended, strict
Stability
stable
Applies to
file
Tags
correctness, crq-cor-035, language, rules-catalog

#Why it matters

Accessing this before super() in a derived constructor throws at runtime.

#Remediation

Call `super(...)` before reading or assigning `this` in the constructor.

#Repository path

The generated metadata points to critiq-rules/libs/rules/catalog/rules/typescript/ts.correctness.this-before-super.rule.yaml.