-
-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Labels
Description
Motivation
To better enforce documentation straight for fields.
Current behavior
Currenlty it is impossible to force this behaviour (@type for fields):
https://jsdoc.app/tags-type.html
Currently if i use match-description
"jsdoc/match-description": [
"error",
{
"matchDescription": "^[a-zA-Z0-9_\\- /\\\\()[\\]{}=?!:.,;*+~#'\"%&<>|]+$",
"contexts": [
"any"
]
}
],but this does not work (as a side note: this also does not apply to the class description).
the require-jsdoc works fine:
"jsdoc/require-jsdoc": [
"error",
{
"publicOnly": true,
"require": {
"ArrowFunctionExpression": true,
"ClassDeclaration": true,
"ClassExpression": true,
"FunctionDeclaration": true,
"FunctionExpression": true,
"MethodDefinition": false
},
"contexts": [
"MethodDefinition:not([accessibility=\"private\"]) > FunctionExpression",
"ClassProperty:not([accessibility=\"private\"])",
"TSPropertySignature"
]
}
],Desired behavior
I want to force fields to have a description and what type they contain.
Alternatives considered
The only alternative is to control it manually.