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:
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?
I use rufo. It’s highly opinionated, with little in the way of configuration options. If you’re looking for something that you can install and be productive with right away, then this is a good option. There is a VSCode extension.
For Ruby code I use rubocop and I’ve been delaying trying others.
My struggle is with erb, there’s erb-linter from Shopify, but there’s a pending PR that woud allow to use in the editor: https://github.com/Shopify/erb-lint/pull/159
Do you have any recommendations for tools to autoformat and/or lint .js.erb and .html.erb files (preferably for usage in VSCode)? Note I’ve also asked this question with more details at Shopify’s erb-lint GitHub repo here.
Edit: Sorry, I overlooked the htmlbeautifier, will take a look into it.