Why this matters
Marking properties as readonly improves code clarity and prevents unintended reassignment.
Check if properties that are never reassigned are marked as readonly. This improves code clarity and prevents unintended reassignment.
Marking properties as readonly improves code clarity and prevents unintended reassignment.
Side-by-side examples engineers can pattern-match during review.
class User {
title: string = "John";
}class User {
readonly title: string = "John";
}
class User {
title: string = "John";
}class User {
readonly title: string = "John";
}
From the same buckets as this rule.