✅ This rule is included in the ts logical presets.
Reassigning function parameters can make code harder to understand and debug.
The parameter’s original value becomes lost, making it difficult to trace what value the parameter had at different points in the function.
Using a new variable instead makes the intent clearer and preserves the original parameter value.
If your codebase intentionally reuses parameter variables for intermediate calculations, this rule might no be for you.
For example, if you prefer writing very small functions and feel confident you and any fellow developers won’t misunderstand the code, you might prefer to disable this rule.