no-mutating-input-with-result
Return replacement object values instead of writing input fields in result-returning functions.
Why
A result-returning function that also writes a caller-owned object changes aliases outside the returned value, hiding its mutation contract.
Fix
Return a fresh replacement and update the caller to use it, or expose an explicit in-place command returning void. Do not add a dummy return or discard the operation.
Examples
interface Config { enabled: boolean;}function enable(config: Config): Config { config.enabled = true; return config;}interface Config { enabled: boolean;}function enable(config: Config): Config { return { ...config, enabled: true };}