Closed pnicolli closed 11 months ago
@pnicolli Here, the max_line_length setting is added specifically for JavaScript and JSX files ([*.{js,jsx}]). The value is set to 80, as you indicated in your message. This ensures that Prettier and ESLint respect the line length limit of 80 characters for these file types.
@Himanshu-370 please read and follow Contributing to Plone and First-time contributors.
This was actually already fixed last week. I didn't link the closing PR properly so this remained open. My bad, sorry. This was the PR: https://github.com/plone/volto/pull/4776
@pnicolli Happy to know it was fixed. I just wanna know was my solution correct? I am a beginner.
@Himanshu-370 sorry your reply ended up somewhere among a ton of other email and I overlooked it. You solution was correct but not perfect imho. If you see the linked PR above #4776 the best solution imho is to remove the config so the editor will use the max line length defined with other prettier config rules.
Describe the bug See https://github.com/plone/volto/pull/3503 This PR introduced new
.editorconfig
files, which is very good, but setsmax_line_length = off
, which is read by prettier and every file we save after that change is then completely rewrote. We also get errors fromeslint(prettier/prettier)
since it still believes lines should be 80 chars long.To Reproduce Steps to reproduce the behavior:
src/config/ControlPanels.js
I would suggest removing that line from
.editorconfig
files, but also setting a default is fine. The default should be 80 imho, otherwise we need a full run of linters fix on the whole repo and I would suggest against that.