You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although the default values as used on jsdoc.app do not necessarily point to valid JavaScript as a default value, e.g., "somebody=John Doe" at https://jsdoc.app/tags-param.html , I favor using standard JavaScript, e.g.,
/*** @param [aName="a default string"] The param description starts here* @param [aName=new Map()] Another param description*/
Likewise for @property (the docs don't show defaults as possible, but they do show optional properties, and it makes sense to be present, especially when @property accompanies @typedef).
I think one should be able to enforce that valid JavaScript is used for a default value, and can be linted (even if, as with @example, one may use overrides to be able to provide specific rules, e.g., not reporting no-unused-expressions).
This rule could also lint @default/@defaultvalue when a value was present.
The text was updated successfully, but these errors were encountered:
Although the default values as used on jsdoc.app do not necessarily point to valid JavaScript as a default value, e.g., "somebody=John Doe" at https://jsdoc.app/tags-param.html , I favor using standard JavaScript, e.g.,
Likewise for
@property
(the docs don't show defaults as possible, but they do show optional properties, and it makes sense to be present, especially when@property
accompanies@typedef
).I think one should be able to enforce that valid JavaScript is used for a default value, and can be linted (even if, as with
@example
, one may useoverrides
to be able to provide specific rules, e.g., not reportingno-unused-expressions
).This rule could also lint
@default
/@defaultvalue
when a value was present.The text was updated successfully, but these errors were encountered: