-
-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Description
Expected behavior
I would expect the rule check-line-alignment with option postHyphens to not add white space at end of line, if there only is an end of line character at the end of the string after the hyphen.
Actual behavior
ESLint sample below shows it best.
ESLint Config
{
"root": true,
"reportUnusedDisableDirectives": true,
"parserOptions": {
"ecmaVersion": 2023,
"sourceType": "module"
},
"env": {
"node": true,
"es2022": true
},
"extends": ["plugin:jsdoc/recommended"],
"plugins": ["unicorn"],
"rules": {
"jsdoc/require-jsdoc": "off",
"jsdoc/require-description": "warn",
"jsdoc/check-syntax": "warn",
"jsdoc/check-line-alignment": ["warn", "never"],
"jsdoc/require-hyphen-before-param-description": [
"warn",
"always",
{ "tags": { "property": "always" } }
],
"jsdoc/require-asterisk-prefix": "warn",
"jsdoc/tag-lines": "off", // TODO: Temporary, will be fixed soon
"jsdoc/no-bad-blocks": ["warn", { "preventAllMultiAsteriskBlocks": true }]
},
"settings": {
"jsdoc": {
"mode": "typescript"
}
}
}ESLint sample
Before linting
* @param {string|string[]|TemplateResult|TemplateResult[]} event.detail.description -
* Notification descriptionAfter linting with --fix
Notice the white space directly after the -.
* @param {string|string[]|TemplateResult|TemplateResult[]} event.detail.description -
* Notification descriptionEnvironment
- Node version: v18.12.1
- ESLint version v8.31.0
eslint-plugin-jsdocversion: 39.8.0