Skip to content
Critiq Docs

Search docs

Search documentation pages and rules

security.maintainability

Avoid mutable module exports

Shared module state should not be exported with `let`/`var` or reassigned after export.

#Metadata

Rule ID
ts.security.no-assign-mutable-export
Severity
low
Confidence
0.84
Languages
javascript, typescript
Presets
security, strict
Stability
stable
Applies to
block
Tags
express, maintainability, module-boundary, rules-catalog, security

#Why it matters

Mutable exports make it easy for unrelated modules to change shared security or configuration state at runtime.

#Remediation

Export read-only values, freeze shared objects, or expose accessors instead of mutable bindings.

#Repository path

The generated metadata points to critiq-rules/libs/rules/catalog/rules/typescript/ts.security.no-assign-mutable-export.rule.yaml.