Linter-eslint & airbnb


I’m using linter-eslint in Atom. To build the rules set, I installed globally eslint, and ran eslint --init in my project. Cool.

But building rule sets is HARD! So I prefer to use “extends” sorta like the:

“extends”: “eslint:recommended”

… that is the default used by eslint’s --init.

So that leads to all the great npm "eslint-config"s available on npm:

So I’m trying to install airbnb’s rules. I installed Atom’s Linter and Linter-eslint. But how do I install airbnb? It looks like I have to install it in my individual projects … even tho I’m only using it in the editor, not in the project’s workflow. Including yet another version of eslint itself!

Is this true? I have to do:
npm install --save-dev eslint-config-airbnb eslint-plugin-react eslint
… just to have my project be based on airbnb? That’s nuts!

It’s over 20MB to do this due to installing eslint in my project.

Is there a “better way”? Maybe a global install of eslint (fine, needed for eslint --init) along with global installs of airbnb (or standard, … etc)?


This may be the answer:

Install globaly eslint and plugins
npm i -g eslint [eslint-plugins] Activate Use Global Eslint package option (Optional) Set Global Node Path with npm config get prefix

I.e. to not fill my project for eslint etc for simply using Linter-eslint along with airbnb’s rules, I can simply install everything globally. But how do I

Activate Use Global Eslint package option?


Have you filed an Issue on the linter-eslint package? Or checked in the #linter channel in the Atom Slack?


Solved, yay! I had missed the setting in the linter-eslint package.

So now I’ve got global linting for the editors (Atom) w/o chubby repos in my project.

And way cool is the eslint --fix command! Handles a lot of white space rules, converting your code to be compliant. Nice!