npm install -g eslint
To test it, you can simple execute eslit <filename>.js from the command line.
1. Now, we can proceed to install the Sublime Text pluging by going through Preferences -> Package Control -> Install Package
2. Select "SublimeLinter-contrib-eslint".
3. And, finally just copy a .eslintrc file (with the rules definitions) to the root path of your project.
or generate it by typing eslint --init
And that's it!, now you will be highlighted for every syntax error detected in your files (based on your .eslintrc configuration) while editing them.