Disallow direct object-property mutation.
| Property | Value |
|---|---|
| Type | suggestion |
| Fixable | No |
| Recommended | warn |
| Strict | error |
Mutating object properties in place introduces side effects and makes state transitions harder to trace. Immutable updates improve predictability.
const next = { ...state, count: state.count + 1 };class AppError extends Error {
constructor(message: string, context?: Record<string, unknown>) {
super(message);
this.name = this.constructor.name;
this.context = context;
}
}state.count = state.count + 1;'zero-tolerance/no-object-mutation': 'error'