Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

.eslintrc extends not working #5

Open
pherris opened this issue Jun 13, 2016 · 3 comments
Open

.eslintrc extends not working #5

pherris opened this issue Jun 13, 2016 · 3 comments

Comments

@pherris
Copy link

pherris commented Jun 13, 2016

Our .eslintrc file "extends": "eslint-config-airbnb", but with this configuration we don't receive the expected errors from our code (no errors are returned). Without this line, some errors are returned but obviously not all errors we expect.

@arich
Copy link

arich commented Jun 13, 2016

I'm having this issue too. Any ideas?

@ocke
Copy link
Contributor

ocke commented Jun 21, 2016

Interesting. The reason is that eslint is a npm package. What it normally would do is require('eslint-config-airbnb'), which you probably have installed using npm.

However, this is some 'standalone' version of eslint running in the ruby environment, which doesn't know about node_modules and all of that.

Correct me if i'm wrong, but I don't think this is going to work.

@sandlerr ? ideas?

@pherris
Copy link
Author

pherris commented Jun 21, 2016

Couple of thoughts...

  1. ExecJS says they don't support require - but commonjs.rb does - so theres that... (just saw that you made the same comment on .eslintrc plugin not working #6)
  2. Executing eslint from ruby and capturing the output (like @pkristoff mentioned in .eslintrc plugin not working #6) seems like a reasonable approach, but I'd prefer not to have a global eslint installed since (for me) this is running on CI. My pre-commit hook runs the linter with npm, so it makes sense that this plugin would execute the same command.
  3. I did play (unsuccessfully) with the --print-config option for eslint to see if I could fully hydrate the .eslintrc file. If all the configuration was fully generated before running this process (it's just a JSON object at the end of the day) this library would probably work as expected.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants