5 ms·
I usually drink the DHH koolaide when it comes to Rails decisions, but I'm surprised by this decision exactly because of his arguments against being forced to w
by ignurant 3y ago
I usually drink the DHH koolaide when it comes to Rails decisions, but I'm surprised by this decision exactly because of his arguments against being forced to write specific styles. I enjoyed default RuboCop when I was first learning Ruby to gain idiomatic knowledge, and strongly disliked after I took off my training wheels. I don't even like using `standard-rb`, which is a much more tolerant configuration of Rubocop. There are often reasons to disregard certain style rules, and I don't want to ask for permission in `# magic disable comments`.
I strongly agree with all of his descriptions of formatting and linting. I also strongly agree with him putting his personal style into Rubocop for the Rails codebase itself, and for project maintainers to be in control of what, if any, style they wish to enforce. But to omakase his style-guide into the consuming projects is surprising and against the very arguments against conforming to style-guides he presents in the first half of the post.
- hakunin 3y agoI am in the camp of using as little rubocop as possible, but still using it. I like it to address the drastic stuff like misalignments, mixed tabs and spaces, obvious sloppiness.[1] Still, it should allow most of the freedom. My preferences are posted in what I call a "narrative" Rails template[2]. It's a relaxed "standardrb", which I have since relaxed even further, but haven't updated the repo yet. [1]: https://github.com/AuthorizeNet/sdk-ruby/commit/1972b153a89346613367cc90f363126ad4dea12b https://github.com/AuthorizeNet/sdk-ruby/commit/1972b153a893... [2]: https://github.com/maxim/narrative/blob/main/example_app/.rubocop.yml https://github.com/maxim/narrative/blob/main/example_app/.ru...
- kawsper 3y agoRubocop is not just styling, it can also be used to catch mistakes and subtle bugs: http://kaspergrubbe.com/enforcing-host-parameter-usage-for-urls-in-e-mail-templates-with-hamlcop http://kaspergrubbe.com/enforcing-host-parameter-usage-for-u...
- jaynetics 3y agoI always slap relaxed.ruby.style on every new project that uses rubocop. It disables all the excessive rules. https://github.com/janlelis/relaxed.ruby.style https://github.com/janlelis/relaxed.ruby.style