Skip to content

Commit da2c872

Browse files
Copilotbrettz9
andcommitted
Add support for preserving list indentation in check-line-alignment (never mode)
Co-authored-by: brettz9 <[email protected]>
1 parent 18e236e commit da2c872

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

docs/rules/check-line-alignment.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,5 +1053,45 @@ function quux () {
10531053
*/
10541054
const fn = ( lorem ) => {}
10551055
// "jsdoc/check-line-alignment": ["error"|"warn", "any",{"disableWrapIndent":true,"wrapIndent":" "}]
1056+
1057+
/**
1058+
* @return {Promise} A promise.
1059+
* - On success, resolves.
1060+
* - On error, rejects with details:
1061+
* - When aborted, textStatus is "abort".
1062+
* - On timeout, textStatus is "timeout".
1063+
*/
1064+
function test() {}
1065+
// "jsdoc/check-line-alignment": ["error"|"warn", "never",{"wrapIndent":" "}]
1066+
1067+
/**
1068+
* @param {string} lorem Description with list:
1069+
* - First item
1070+
* - Second item
1071+
* - Nested item
1072+
* - Another nested item
1073+
*/
1074+
function test() {}
1075+
// "jsdoc/check-line-alignment": ["error"|"warn", "never",{"wrapIndent":" "}]
1076+
1077+
/**
1078+
* @return {Promise} A promise.
1079+
* 1. First step
1080+
* 2. Second step with continuation
1081+
* on another line
1082+
* 3. Third step
1083+
*/
1084+
function test() {}
1085+
// "jsdoc/check-line-alignment": ["error"|"warn", "never",{"wrapIndent":" "}]
1086+
1087+
/**
1088+
* @param {Object} options Configuration options.
1089+
* * First option
1090+
* * Second option with details:
1091+
* * Nested detail
1092+
* * Another detail
1093+
*/
1094+
function test() {}
1095+
// "jsdoc/check-line-alignment": ["error"|"warn", "never",{"wrapIndent":" "}]
10561096
````
10571097

0 commit comments

Comments
 (0)