opentable / eslint-config-opentable

Extends eslint-config-airbnb-base with OpenTable's internal preferences.
6 stars 9 forks source link

IDE integration problems (and solutions I've found) #7

Open mdboop opened 8 years ago

mdboop commented 8 years ago

For what it's worth, I've been experiencing problems getting this working with Atom. It throws up errors in JS files after npm install --save-dev eslint-config-opentable eslint. On npm 2.x, installing eslint-plugin-import usually fixes it, but it seems very specific versions need to be installed for it all to work together. I haven't had time to investigate this further, though, but here's what works for me:

  "eslint": "^3.2.2",
   "eslint-config-opentable": "^5.0.0",
   "eslint-plugin-import": "^1.12.0",

For npm 3.x, I found that running this command and installing the airbnb-base made it all work together nicely. From the airbnb-base repo:

(
  export PKG=eslint-config-airbnb-base;
  npm info "$PKG" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG"
)
jrolfs commented 8 years ago

Nice solution to use the local eslint executable for Neovim + Neomake: https://github.com/jaawerth/neomake-local-eslint-first https://github.com/jrolfs/neovim/blob/master/home/.config/nvim/init.vim#L48