no-object-as-default-parameter
UnreleasedConfiguration
rslint.config.ts
Rule Details
Disallow non-empty object literals as function-parameter defaults. Passing a partial object replaces the entire default object, so individual defaulted properties should usually be expressed with parameter destructuring instead.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
The rule is syntax-based. A TypeScript annotation does not exempt a non-empty object literal default: