argyleink / open-props

CSS custom properties to help accelerate adaptive and consistent design.
https://open-props.style
MIT License
4.7k stars 191 forks source link

Collaboration and code formatter #432

Closed indaco closed 11 months ago

indaco commented 11 months ago

Hi, first, thanks for the amazing work on open-props. It is simply useful and well crafted.

IMHO, to improve collaboration though PRs there is a missing feature related to the setup of a code formatter like prettier. I have a PR in draft I would love to submit but to avoid formatting I have to stay out from my IDE

So far to me, the less impactful prettier configuration (.prettierrc file) on the existing code base is something like

{
  "singleQuote": true,
  "semi": false,
  "useTabs": false,
  "printWidth": 120,
  "bracketSpacing": false,
  "bracketSameLine": false
}

And of course .prettierignore to exclude files from it

What do you think?

For sure I can submit a PR for its setup with the above configuration as baseline to be tuned based on your styles.

Thanks

argyleink commented 11 months ago

Thanks for the offer, compliments and consideration! I'll add this as a v2 consideration 👍🏻

The only issues so far with formatting and PRs has been folks over committing in a PR instead of just committing the lines they changed. They dont know how to turn off a formatter for projects that dont have one. The reason I think it's better for v2 also, is because it'd likely cause a large amount of change in the repo to align it with a formatter/linter, and not sure the impact of that is desirable at the moment. The repo would also need a formatter/linter setup for the JS/TS files. Also, the next version won't "build" so many files, and right now the built files would need to be modified to align with the formatter too. Just a bit too intertwined at the moment, but yeah, next version could ship with one and work with it from the start.

indaco commented 11 months ago

Thanks for your response.

Feel free to close this if you wish.

argyleink commented 11 months ago

will do, and will ping back if it makes it into v2!