Skip to content
Critiq Docs

Search docs

Search documentation pages and rules

correctness.modules

Assignment to an imported binding

Code assigns to or updates a symbol declared by an import.

#Metadata

Rule ID
ts.correctness.assignment-to-import-binding
Severity
medium
Confidence
0.95
Languages
javascript, typescript
Presets
recommended, strict
Stability
stable
Applies to
file
Tags
correctness, crq-cor-021, modules, public-directory-parity, rules-catalog

#Why it matters

ES module imports are read-only bindings; reassignment fails at runtime and signals a mistaken refactor.

#Remediation

Use a local variable, change the exporting module, or refactor so imports remain immutable.

#Repository path

The generated metadata points to critiq-rules/libs/rules/catalog/rules/typescript/ts.correctness.assignment-to-import-binding.rule.yaml.