Reputation: 302
I'm using Sublime Text and I'm fairly new to it.
I'd like to have my coding errors highlighted : missing semi colon, non existing variables... But even installing the linters, Sublime Linter package and jslint and jshint, it doesn't work the way I want.
JSLint is way too strict: it was giving me errors for using tabs instead of spaces.
What I want is :
How can I do this ? I've checked before here on this forum, and on Google, but I haven't found anything :(
Nicolas.
Upvotes: 0
Views: 927
Reputation: 3480
I think ESLint will fit your needs. It's newer than jshint and jslint. You can read a comparison here: https://www.sitepoint.com/comparison-javascript-linting-tools/. It's really flexible in specifying the linting rules.
The primary reason ESLint was created was to allow developers to create their own linting rules. ESLint is designed to have all rules completely pluggable.
The rules that will help you with missing semicolons and undefined variables are semi and no-undef.
You can use it in Sublime with the SublimeLinter-eslint or SublimeLinter-contrib-eslint_d plugin. The second one is faster, and it allows me to enable linting to be executed as I type.
Upvotes: 1