complete/no-redundant-jsdoc-default
💼 This rule is enabled in the ✅ recommended config.
📝 Disallows setting object properties to their JSDoc default values.
💭 This rule requires type information.
Disallows setting object properties to their JSDoc default values. This catches redundant
configuration such as explicitly setting a property to true when its type declaration documents
@default true.
Rule Details
interface Foo {
/**
* @default true
*/
readonly someProp?: boolean;
}
// Bad
const foo: Foo = {
someProp: true,
};
// Good
const foo: Foo = {};
const foo: Foo = {
someProp: false,
};
Options
This rule is not configurable.