diff --git a/src/rules/checkLinesAlignment.js b/src/rules/checkLinesAlignment.js index 7d410e34f..2f0eb65c3 100644 --- a/src/rules/checkLinesAlignment.js +++ b/src/rules/checkLinesAlignment.js @@ -178,7 +178,9 @@ export default iterateJsdoc(({ indent, }) => { if (context.options[0] === 'never') { - throw new Error('The `never` option is not yet implemented for this rule.'); + report('The `never` option is not yet implemented for this rule.'); + + return; } if (context.options[0] !== 'always') { diff --git a/test/rules/assertions/checkLinesAlignment.js b/test/rules/assertions/checkLinesAlignment.js index fbf5083f7..b58917690 100644 --- a/test/rules/assertions/checkLinesAlignment.js +++ b/test/rules/assertions/checkLinesAlignment.js @@ -364,6 +364,26 @@ export default { */ `, }, + { + code: ` + /** + * Not implemented yet. + * + * @param {string} lorem Description. + * @param {int} sit Description multi words. + */ + const fn = ( lorem, sit ) => {} + `, + errors: [ + { + message: 'The `never` option is not yet implemented for this rule.', + type: 'Block', + }, + ], + options: [ + 'never', + ], + }, ], valid: [ { @@ -533,7 +553,11 @@ export default { code: ` /** * Not validating without option. + * + * @param {string} lorem Description. + * @param {int} sit Description multi words. */ + const fn = ( lorem, sit ) => {} `, }, ],