|
8 | 8 | * [`customSpacings`](#user-content-check-line-alignment-options-customspacings)
|
9 | 9 | * [`preserveMainDescriptionPostDelimiter`](#user-content-check-line-alignment-options-preservemaindescriptionpostdelimiter)
|
10 | 10 | * [`wrapIndent`](#user-content-check-line-alignment-options-wrapindent)
|
| 11 | + * [`disableWrapIndent`](#user-content-check-line-alignment-options-disablewrapindent) |
11 | 12 | * [Context and settings](#user-content-check-line-alignment-context-and-settings)
|
12 | 13 | * [Failing examples](#user-content-check-line-alignment-failing-examples)
|
13 | 14 | * [Passing examples](#user-content-check-line-alignment-passing-examples)
|
@@ -72,14 +73,20 @@ main description. If `false` or unset, will be set to a single space.
|
72 | 73 | The indent that will be applied for tag text after the first line.
|
73 | 74 | Default to the empty string (no indent).
|
74 | 75 |
|
| 76 | +<a name="user-content-check-line-alignment-options-disablewrapindent"></a> |
| 77 | +<a name="check-line-alignment-options-disablewrapindent"></a> |
| 78 | +### <code>disableWrapIndent</code> |
| 79 | + |
| 80 | +Disables `wrapIndent`; existing wrap indentation is preserved without changes. |
| 81 | + |
75 | 82 | <a name="user-content-check-line-alignment-context-and-settings"></a>
|
76 | 83 | <a name="check-line-alignment-context-and-settings"></a>
|
77 | 84 | ## Context and settings
|
78 | 85 |
|
79 | 86 | |||
|
80 | 87 | |---|---|
|
81 | 88 | |Context|everywhere|
|
82 |
| -|Options|string ("always", "never", "any") followed by object with `customSpacings`, `preserveMainDescriptionPostDelimiter`, `tags`, `wrapIndent`| |
| 89 | +|Options|string ("always", "never", "any") followed by object with `customSpacings`, `preserveMainDescriptionPostDelimiter`, `tags`, `wrapIndent`, `disableWrapIndent`| |
83 | 90 | |Tags|`param`, `property`, `returns` and others added by `tags`|
|
84 | 91 | |Aliases|`arg`, `argument`, `prop`, `return`|
|
85 | 92 | |Recommended|false|
|
@@ -998,5 +1005,23 @@ function quux () {}
|
998 | 1005 | * @returns {number} -1 if world transform has negative scale, 1 otherwise.
|
999 | 1006 | */
|
1000 | 1007 | // "jsdoc/check-line-alignment": ["error"|"warn", "never"]
|
| 1008 | + |
| 1009 | +/** |
| 1010 | + * @param {string} lorem Description |
| 1011 | + * with multiple lines preserving existing indentation when wrapIndent is disabled. |
| 1012 | + */ |
| 1013 | +function quux () { |
| 1014 | +} |
| 1015 | +// "jsdoc/check-line-alignment": ["error"|"warn", "any",{"disableWrapIndent":true}] |
| 1016 | + |
| 1017 | +/** |
| 1018 | + * Function description with disableWrapIndent true, but wrapIndent defined. |
| 1019 | + * Preserves existing indentation regardless of wrapIndent value. |
| 1020 | + * |
| 1021 | + * @param {string} lorem Description |
| 1022 | + * with multiple lines. |
| 1023 | + */ |
| 1024 | +const fn = ( lorem ) => {} |
| 1025 | +// "jsdoc/check-line-alignment": ["error"|"warn", "any",{"disableWrapIndent":true,"wrapIndent":" "}] |
1001 | 1026 | ````
|
1002 | 1027 |
|
0 commit comments