DEV Community

Discussion on: Can forced linting surpress contributions when linting is first introduced?

Collapse
suprnova32 profile image
Patricio Cano

This is why I love the Elixir formatter. When you run it, it automatically fixes any offenses. You can add it as a pre-commit hook and your work will always be formatted. You can also run a check on CI to make sure all code is formatted.

I like that it is really opinionated and not really configurable. It gives you a style guide for the entire Elixir ecosystem.

I’d wish there was something like this for Ruby. Rubocop can be such a pain...

Collapse
jf1 profile image
Jed Fox

Check out Prettier’s Ruby plugin:

github.com/prettier/plugin-ruby

Thread Thread
suprnova32 profile image
Patricio Cano

I've heard about Prettier before, but it is still not quite the same as the Elixir formatter. For Elixir, it is a part of the language, and many libraries use it. This means that there is a cohesiveness in most Elixir codebases.

Ruby, while it does have some efforts, does not have a formatter as a core part of the language.