ackama / rails-template

Application template for Rails 7 projects; preloaded with best practices for TDD, security, deployment, and developer productivity.
Other
294 stars 15 forks source link

Use `always` for `SelfClosingTag` in erb-lint #509

Closed G-Rath closed 9 months ago

G-Rath commented 10 months ago

The default for this rule is never which is arguably the better setting since we've never needed to support XHTML and results in slightly smaller HTML, but Prettier enforces the opposite and is not configurable - in this case I think it would be better if we're consistent across our stacks vs the very tiny win of slightly less code.

https://github.com/Shopify/erb-lint?tab=readme-ov-file#selfclosingtag

lukeify commented 10 months ago

Discussed at Rails Guild on 3 November 2023, this seems good and is ready for dev.

G-Rath commented 10 months ago

I realised that also JSX requires the closing / which is something we're more likely to be writing in our React apps vs native HTML