I was wondering if anyone had a setup for linting coffeescript that they really like?
This would be the first time I’ve setup linting and after some preliminary research I’m more confused than I’d like to be. Seems like you can:
- lint individual files.
- Setup a watcher to watch files for changes and re-lint on change
- do the above but integrated with the meteor build tool
- have linting integrated into the editor
- lint code whenever you attempt to commit
and its not always the case that these mesh together well.
Coffeelint looks to be the most popular coffeescript linter. The AtomLinter/linter-coffeelint plugin works pretty good with Atom. Meteor-coffeelint is a meteor package that llints when the code is built, which is nice, but it doesn’t seem to work quite right with the Atomlinter because they look for different config files for the linter. (CoffeeLint uses .coffeelintrc, while the atom linter uses
coffeelint.json or settings in
But if I want to enforce the same linting for my whole project I probably should setup a pre-commit hook and lint files before commit with something like https://github.com/tarmolov/git-hooks-js
Are there best practices for this sort of thing, or as mentioned does anyone have a good coffeescript linting setup they like to use?
@mitar I believe you said in some post that you have a coffeescript linting setup