Files
ubicloud/views/components/button.erb
Daniel Farina 6cc0fb9135 Update erb-formatter version
I was investigating changing how we formatted some code, and found
that `erb-formatter` also formatted embedded code in disagreement with
how `rubocop-erb` does.

Such differences in formatting interpretation can cause failure in CI,
where committing code produced by `erb-formatter` can fail rubocop.

To have investigated this so closely is a lot of effort to achieve
nearly nothing.  Originally, I intended to change the
`Layout/DotPosition` rubocop rule to `trailing`, but where the
`syntax_tree` gem used by `erb-formatter` would produce code that
*always* format code that would fail Rubocop.

I changed my mind late in the process: it was based on a
misunderstanding of how `pry` handled multi-line pastes of code with
leading `.`, which runs what come after in `sh`.  In a multi-line
paste, it correctly interprets it as method chaining instead.

By then I had made those enhancements to `erb-formatter` and decided
to keep them: there's no reason to redundantly format code or expose
ourselves to the `syntax_tree` dependency.

There is one very small additional change where `erb-formatter`
eliminates an extra space now.
2025-04-10 08:47:13 -07:00

1.4 KiB