@@ -66,6 +66,15 @@ each object property-value pair.
6666
6767Defaults to ` "comma" ` .
6868
69+ <a name =" user-content-type-formatting-options-objectfieldseparatoroptionallinebreak " ></a >
70+ <a name =" type-formatting-options-objectfieldseparatoroptionallinebreak " ></a >
71+ ### <code >objectFieldSeparatorOptionalLinebreak</code >
72+
73+ Whether ` objectFieldSeparator ` set to ` "semicolon-and-linebreak" ` or
74+ ` "comma-and-linebreak" ` should be allowed to optionally drop the linebreak.
75+
76+ Defaults to ` true ` .
77+
6978<a name =" user-content-type-formatting-options-objectfieldindent " ></a >
7079<a name =" type-formatting-options-objectfieldindent " ></a >
7180### <code >objectFieldIndent</code >
@@ -110,7 +119,7 @@ Determines the spacing to add to unions (`|`). Defaults to a single space (`" "`
110119| Tags| ` param ` , ` property ` , ` returns ` , ` this ` , ` throws ` , ` type ` , ` typedef ` , ` yields ` |
111120| Recommended| false|
112121| Settings| ` mode ` |
113- | Options| ` arrayBrackets ` , ` enableFixer ` , ` genericDot ` , ` objectFieldIndent ` , ` objectFieldQuote ` , ` objectFieldSeparator ` , ` objectFieldSeparatorTrailingPunctuation ` , ` propertyQuotes ` , ` separatorForSingleObjectField ` , ` stringQuotes ` , ` typeBracketSpacing ` , ` unionSpacing ` |
122+ | Options| ` arrayBrackets ` , ` enableFixer ` , ` genericDot ` , ` objectFieldIndent ` , ` objectFieldQuote ` , ` objectFieldSeparator ` , ` objectFieldSeparatorOptionalLinebreak ` , ` objectFieldSeparatorTrailingPunctuation ` , ` propertyQuotes ` , ` separatorForSingleObjectField ` , ` stringQuotes ` , ` typeBracketSpacing ` , ` unionSpacing ` |
114123
115124<a name =" user-content-type-formatting-failing-examples " ></a >
116125<a name =" type-formatting-failing-examples " ></a >
@@ -281,6 +290,21 @@ The following patterns are considered problems:
281290 */
282291// "jsdoc/type-formatting": ["error"|"warn", {"propertyQuotes":null}]
283292// Message: Inconsistent null property quotes usage
293+
294+ /**
295+ * @param {{a: string, b: number}} cfg
296+ */
297+ // "jsdoc/type-formatting": ["error"|"warn", {"objectFieldIndent":" ","objectFieldSeparator":"semicolon-and-linebreak","objectFieldSeparatorOptionalLinebreak":true}]
298+ // Message: Inconsistent semicolon-and-linebreak separator usage
299+
300+ /**
301+ * @param {{
302+ * a: string,
303+ * b: number
304+ * }} cfg
305+ */
306+ // "jsdoc/type-formatting": ["error"|"warn", {"objectFieldIndent":" ","objectFieldSeparator":"semicolon-and-linebreak","objectFieldSeparatorOptionalLinebreak":true}]
307+ // Message: Inconsistent semicolon-and-linebreak separator usage
284308````
285309
286310
@@ -357,5 +381,18 @@ The following patterns are not considered problems:
357381/**
358382 * @param cfg
359383 */
384+
385+ /**
386+ * @param {{a: string; b: number}} cfg
387+ */
388+ // "jsdoc/type-formatting": ["error"|"warn", {"objectFieldIndent":" ","objectFieldSeparator":"semicolon-and-linebreak","objectFieldSeparatorOptionalLinebreak":true}]
389+
390+ /**
391+ * @param {{
392+ * a: string;
393+ * b: number
394+ * }} cfg
395+ */
396+ // "jsdoc/type-formatting": ["error"|"warn", {"objectFieldIndent":" ","objectFieldSeparator":"semicolon-and-linebreak","objectFieldSeparatorOptionalLinebreak":true}]
360397````
361398
0 commit comments