PhlexUI / phlex_ui

Ruby gem for Phlex UI Components
https://phlexui.com/
MIT License
115 stars 11 forks source link

Add standardrb and apply standardization to lib/* #30

Closed coderberry closed 5 months ago

coderberry commented 6 months ago

This PR adds the standardrb gem which will apply "standard" formatting to all files within the lib folder. The primary benefit of this PR is that the code is auto-formattable via the rake command rake standard:fix.

I submitted this PR because the spacing appears to be 4 spaces per tab (which doesn't seem like the intended goal given the .vscode/settings.json containing "editor.tabSize": 2.

Please let me know if this is something you do not want in the project. I'm good either way, but this change will allow everyone to apply the same formatting without manually modifying the formatting.

I also added a GitHub Action that validates the formatting and prevents merging until it's correct as well as Gemfile which allows us to run bundle install on checkout.

Thanks @georgekettle!

georgekettle commented 5 months ago

Looks great! Thanks @coderberry 👍🏼