To Introduce ESLint to Atom

Javascript is an interpreted programming language. So it will not show error immediately.
This make it a little cumbersome.
To resolve this problem, there come a ESLint.
This is it’s Explanation on homepage:
ESLint is an open source project originally created by Nicholas C. Zakas in June 2013.
Its goal is to provide a pluggable linting utility for JavaScript.

This is what it looks like after you introduce eslint to Atom.

eslint

So, How to Introduce ESLint to Atom:

1. Install Atom’s package [linter-eslint].

  • Use Atom package manager.
  • Or user rpm command:
1
$ apm install linter-eslint

2. Inatall [ESLint] to your project.

1
2
$ npm install --save-dev eslint
$ npm install --save-dev [eslint-plugins]

Or, if you use nodejs. You can add these to your package.json set file:

1
2
3
"eslint": "^2.13.1",
"eslint-plugin-import": "^1.9.2",
"eslint-plugin-react": "^5.2.2",

Then run npm install

3. Create [.eslintrc.xxx] file.

1
$ touch .eslintrc.json
1
2
3
{
"extends": "airbnb"
}

Or, run command:

1
$ eslint --init