How can i make my Prettier printWidth work with classnames as well?

English is not my first language and tried to google this the best i could, i use tailwind so i get some huge classnames, like this for example: (this is just one line) "<div className='grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]'</div>" Since i work on a small monitor, my printWidth is set to 80 and the line above almost double of that and doesn't wrap properly The wrap is working on strings and attributes but not with classnames strings, how can i fix this? here it is my prettierrc
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"quoteProps": "as-needed",
"jsxSingleQuote": true,
"bracketSpacing": true,
"arrowParens": "always",
"endOfLine": "lf",
"proseWrap": "always",
"htmlWhitespaceSensitivity": "css",
"embeddedLanguageFormatting": "auto",
"requirePragma": false,
"insertPragma": false
}
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"quoteProps": "as-needed",
"jsxSingleQuote": true,
"bracketSpacing": true,
"arrowParens": "always",
"endOfLine": "lf",
"proseWrap": "always",
"htmlWhitespaceSensitivity": "css",
"embeddedLanguageFormatting": "auto",
"requirePragma": false,
"insertPragma": false
}
` Maybe there is a option that works for my usecase? i really don't know Thanks for your time
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server