Code Format StyleGuide Automation

Currently we use a mix of SublimeText plugins and a carefully crafted .editorconfig to make sure the code everyone commits is formatted to look exactly the same. (What? We’re perfectionists.) However, I want to make machines do the work. I would like to make this part of a pre-commit hook. I’m fishing for ideas, and any contributions are appreciated. We use html/scss/js/handlebars templates.

scss-lint is my newest friend.

That takes care of sass - is there the same thing for js / html?

Yes, for JS there is this.

Now, what about markup / handlebars templates?

For markup, there’s a venerable tool called tidy.

That’s what I’m coming up with.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.