Line breaking happening at 96 print width?
See original GitHub issueNot sure if this is related to #8 ?
95 characters:
96 characters:
I’d expect it to wrap such that no characters (including the comment characters) exceed the print width (shown in the screenshot with the vertical line).
This is my .prettierrc:
{
"plugins": ["./node_modules/prettier-plugin-jsdoc"],
"jsdocCapitalizeDescription": false,
}
No override of the default printWidth of 80, so it should be 80. Also the rest of my code formats properly to 80.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:17 (14 by maintainers)
Top Results From Across the Web
Line break in a span with defined width? - css - Stack Overflow
How can I break a line in a span once the width of the span is reached? I tried max-width, but this did...
Read more >When a Line Doesn't Break - CSS-Tricks
This works similar to adding a zero-width space character, but the list items will have no visual separation.
Read more >Six Word tricks to reduce space between lines - Office Watch
A simple way to reduce the line spacing is to switch from the usual Paragraph Break (pressing Enter) for a Line Break (Shift...
Read more >Mastering wrapping of flex items - CSS: Cascading Style Sheets
There is however the ability to wrap flex items onto new lines, ... .wrapper { border: 2px dotted rgb(96, 139, 168); width: 500px;...
Read more >Newline after assignment operator = on long line formatted to ...
Expected behavior: That the line would be broken up such that it does not break the print-width rule. Or at least doesn't change...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Ok. I Will do it as you want this weekend.
Okay, according to this comment, I guess this was actually a feature:
https://github.com/hosseinmd/prettier-plugin-jsdoc/issues/26#issuecomment-771823206
I was going to say that this was a weird error in judgement. I don’t know of any word processor that tries to “smart” wrap like this. MS Word doesn’t do it. VSCode’s word wrap doesn’t do it. Etc.
However, apparently Prettier does sort of do it:
Despite all this, I wish there was a way to disable this behavior. I would like to just have it hard wrap at
printWidthalways. I really think this looks stupid and is unexpected:Also, I can’t verify this, but it seems like Prettier does actually hard wrap at
printWidthwhenever possible, but sometimes it’s not able to, e.g a long string literal, hence why they say it sometimes produces lines over theprintWidth.