Setting up and using ESLint in Sublime Text 3
First, you need to be sure you have npm installed. Then, in your command line, install the ESLint package by typing
npm install -g eslint
Package Control: Install Package
You should now be able to search for Sublime packages. First, you need to install the SublimeLinter package, so type
into this field and press enter when it’s highlighted. This will install the package for you automatically. To find the ESLint package you need, type
and press enter when it’s highlighted. That’s all! ESLint is now installed. However, there is still more configuration to be done. We need to tell the linter where we have node installed and to do so type
into your command line. Then, navigate to where your SublimeLinter.sublime-settings file is located (this file was created when you installed the SublimeLinter package). In this file, find the “paths” property and under your operating system, add the result of “which node” that you typed earlier as a string (for example, under “windows” I would put “/c/Program Files/nodejs/node” between the angle brackets).
and answer the questions it asks. This will create a .eslintrc.js file in your root directory. You can edit this file to your liking, and I recommend taking a look at the linter rules to determine which ones you need.