Open pherris opened 8 years ago
I'm having this issue too. Any ideas?
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?
Couple of thoughts...
require
- but commonjs.rb
does - so theres that... (just saw that you made the same comment on #6)eslint
from ruby and capturing the output (like @pkristoff mentioned in #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.--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.
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.