node-swig / swig-templates

Take a swig of the best template engine for JavaScript.
http://node-swig.github.io/swig-templates/
MIT License
209 stars 29 forks source link

choose a new linter #11

Closed paulcpederson closed 8 years ago

paulcpederson commented 8 years ago

jslint is no longer the only option out there in terms of enforcing a style guide. The only requirement is that it must have a command line runner which can accept multiple files. Options are:

Once chosen, all code will need to be updated to pass the linter (if we change styles). The Makefile and git hooks will also need to be updated.

/cc @cdaringe @Lochlan (carry over from #9)

Lochlan commented 8 years ago

I'm not a fan of standard for semicolon reasons as I already mentioned. Semistandard looks very cool although I have some (extremely mild) concerns about the potential longevity of that project. (But I don't see that as being a disqualifier here.) Jscs and jshint seem like good choices as well. I would also be ok with eslint, which you didn't mention.

paulcpederson commented 8 years ago

Yeah, I think the no semicolons thing is weirdly divisive so to me it makes sense to eliminate standard just so we don't have to field bike shedding issues about there not being semi colons...

After looking into jshint a bit more, seems like they are moving away from being a style guide tool. For example, they just deprecated checking for indentation depth. So I don't think it is what we really want.

eslint, semistandard, and jscs all seem like fine options. It's really about how many updates we want to make across the codebase. I can probably just try out all of them and see how many errors each produces.

cdaringe commented 8 years ago

so i'm trying out eslint with just their 'recommended' settings. hardly any updates needed. 37? no sweat! staging the PR now...

hopefully you guys are down!

paulcpederson commented 8 years ago

:+1:

paulcpederson commented 8 years ago

going with eslint as of #12