Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 741 Bytes

prefer-shorthand-jsdoc-types.md

File metadata and controls

29 lines (19 loc) · 741 Bytes

interfaced/prefer-shorthand-jsdoc-types

Enforce usage of a shorthand notation for some JSDoc types.

Fixable: this rule is automatically fixable by --fix.

Options

{
	optionalParam: <string>,
	nullableType: <string>
}

optionalParam

Whether optional type (=) should be preferred to an union with |undefined in @param tag. It can be either 'always' or 'never'. The default value is 'always'.

nullableType

Whether nullable type (?) should be preferred to an union with |null. It can be either 'always' or 'never'. The default value is 'always'.

Resources