prefer-readonly-parameter-types
Configuration
rslint.config.ts
Rule Details
Require function parameters to be typed as readonly to prevent accidental mutation of inputs. Mutating function arguments can lead to confusing, hard to debug behavior. This rule flags function parameters whose types are not readonly, encouraging the use of Readonly<T>, readonly arrays, and other immutable type constructs.
Examples of incorrect code for this rule:
Examples of correct code for this rule: