-
-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Description
Hi, I found rule jsdoc/match-description is not checking the block description on class definition.
Repro example:
// this doesn't match the regex, but no error was reported
/**
* blabla
* @extends Base
*/
class C1 extends Base {
constructor() {
super();
this.a = 1;
}
}
// this doesn't match the regex either, but no error was reported
/**
* ?blabla
* @extends Base
*/
class C2 extends Base {
constructor() {
super();
this.a = 1;
}
}
// this also doesn't match the regex, but no error was reported
/**
* blabla
* @extends Base
*/
const C3 = class extends Base {
constructor() {
super();
this.a = 1;
}
};
// error reported: JSDoc description does not satisfy the regex
// pattern jsdoc/match-description
/**
* aa
* @param {*} a aaaa
* @param {*} b aaaa
*/
function foo(a, b) {
}The .eslintrc config is:
"jsdoc/match-description": [ "error", {
"matchDescription": "^([A-Z]|[`\\d_])[\\s\\S]*[.?!`]$",
"tags": {
"param": "(|^[A-Za-z][\\s\\S]*$)",
"returns": "(|^[A-Za-z][\\s\\S]*$)"
}
}],Versions:
"eslint": "^6.6.0",
"eslint-plugin-jsdoc": "^15.12.2",
"npm -v": 6.11.3
"node -v": v12.10.0
OS: macOS 10.14.6
Metadata
Metadata
Assignees
Labels
No labels