diff --git a/README.md b/README.md index f169b753f..644148e16 100644 --- a/README.md +++ b/README.md @@ -2303,6 +2303,13 @@ function quux (options) {} */ function quux () {} // "jsdoc/check-line-alignment": ["error"|"warn", "never",{"tags":["param"]}] + +/** + * @param parameter Description. + */ +function func(parameter){ + +} ```` diff --git a/src/rules/checkLineAlignment.js b/src/rules/checkLineAlignment.js index ec8c58cc2..1512c9b1b 100644 --- a/src/rules/checkLineAlignment.js +++ b/src/rules/checkLineAlignment.js @@ -50,7 +50,7 @@ const checkNotAlignedPerTag = (utils, tag) => { callbck(!ret, contentProp); } - return ret; + return ret && (callbck || !contentProp); }); }; diff --git a/test/rules/assertions/checkLineAlignment.js b/test/rules/assertions/checkLineAlignment.js index ced574661..203c9ee0c 100644 --- a/test/rules/assertions/checkLineAlignment.js +++ b/test/rules/assertions/checkLineAlignment.js @@ -943,5 +943,15 @@ export default { tags: ['param'], }], }, + { + code: ` + /** + * @param parameter Description. + */ + function func(parameter){ + + } + `, + }, ], };