Currently, empty lines between multiple @example tags are considered to violate the sort-tags flag for intra-group empty lines.
The Setup
tag-lines set to "any", with startLines set to 1.
sort-tags' linesBetween set to 1.
prettier-jsdoc-plugin, set to insert lines between tag groups only, and not intra-group empty lines.
example is set in its own group under tagSequence
The Note
This cleanly enforces empty lines only between tag groups and goes well with formatters, such as the one I am using. I am using TSDoc specifications, but the logic remains the same. Often, multiple example tags are separated for readability, particularly when they contain larger amounts of code and explanation, especially compared to other tags that come in duplicates, such as @param tags. I manually add lines between the tags, but the intra-group empty lines error fires immediately. Additionally, formatters such as the one I am using insert empty lines between multiple @example tags, treating each tag as its own separate group (to fit with my style of writing and to ensure readability with longer documentation comments). This also shows the same error regarding intra-group empty lines.
The Suggestion/Request
A specific config option/subrule under sort-tags, similar to linesBetween, or under tag-lines (still set to "any") if deemed more appropriate, as an option set alongside startLines, endLines, etc., to allow empty lines in between @example and other long tags in specific or duplicate tag scenarios.
I have never contributed to or worked on linters and their plugins, but if this is a feature you would prefer I directly submit a PR for, I would appreciate it if you could perhaps point me in the right direction at least, so I know where to start.
Currently, empty lines between multiple
@exampletags are considered to violate thesort-tagsflag for intra-group empty lines.The Setup
tag-linesset to "any", withstartLinesset to 1.sort-tags'linesBetweenset to 1.prettier-jsdoc-plugin, set to insert lines between tag groups only, and not intra-group empty lines.exampleis set in its own group undertagSequenceThe Note
This cleanly enforces empty lines only between tag groups and goes well with formatters, such as the one I am using. I am using TSDoc specifications, but the logic remains the same. Often, multiple example tags are separated for readability, particularly when they contain larger amounts of code and explanation, especially compared to other tags that come in duplicates, such as
@paramtags. I manually add lines between the tags, but the intra-group empty lines error fires immediately. Additionally, formatters such as the one I am using insert empty lines between multiple@exampletags, treating each tag as its own separate group (to fit with my style of writing and to ensure readability with longer documentation comments). This also shows the same error regarding intra-group empty lines.The Suggestion/Request
A specific config option/subrule under
sort-tags, similar tolinesBetween, or undertag-lines(still set to "any") if deemed more appropriate, as an option set alongsidestartLines,endLines, etc., to allow empty lines in between@exampleand other long tags in specific or duplicate tag scenarios.