setup eslint with es6 in sublime text
get started with eslint
npm install eslint -g
you can install it either globally or locally.
.eslintrc in the root of your project.Then you can add
set up your environment with
env, and add rules as well.
to use a rule, add it’s name, then pass an array. the array is an array of options.
the first is either…
- 0 - Disable the rule
- 1 - Warn about the rule
- 2 - Throw error about the rule
see the full list of rules here
there are different types of parsers avaliable. One of them is the
this is will allow you to utilize es6 syntax.
there’s a great plugin for sublime text called
sublime-linter . once it is installed, there are a bunch of other plugins for it as well, including one for eslint. install it whit package control.
configure sublime-linter and install