Hello everyone, this month I started doing some research for linters so me and my teammates can all use the same code style for our project. I found these tools:
- Rubocop (we all know this)
- Standard (basically Rubocop with different default rules) (GitHub - testdouble/standard: 🌟 Ruby Style Guide, with linter & automatic code fixer)
- Reek (ruby code smells) (GitHub - troessner/reek: Code smell detector for Ruby)
- rails_best_practices (rails code smells) (GitHub - flyerhzm/rails_best_practices: a code metric tool for rails projects)
- htmlbeautifier (html+erb) (GitHub - threedaymonk/htmlbeautifier: A normaliser/beautifier for HTML that also understands embedded Ruby. Ideal for tidying up Rails templates.)
- scss-lint (GitHub - sds/scss-lint: Configurable tool for writing clean, consistent SCSS)
I was able to get the first 4 working with VScode (and seems to be atom extensions for them too) but I can’t make the scss-lint vscode extension work and I can’t find a way to use the htmlbeautifier gem with the code editor.
I’ve also found StandardJS (https://standardjs.com) for JS code but it doesn’t understand sprockets
// require... syntax so I was planning to use it only for projects that uses webpacker.
So I was thinking, do you use code style linters? if so, do you have them integrated with your code editor? which editor? can you share your recommendations?