codeclimate / codeclimate-eslint

Code Climate Engine for ESLint
MIT License
95 stars 93 forks source link

Ignore settings for plugins that aren't supported #320

Closed gilbarbara closed 6 years ago

gilbarbara commented 7 years ago

Hello,

Since eslint-plugin-import can't be used with CodeClimate, is there a way to ignore its settings? This engine breaks with Error: unable to load resolver "webpack". with the configuration below.

"settings": {
    "import/resolver": {
      "webpack": {
        "config": "./config/webpack.config.js"
      }
    }
  }
abbyarmada commented 7 years ago

@katwchen do you mind taking a look at this and actioning a fix? We've had past discussions about it before https://github.com/codeclimate/codeclimate-eslint/search?q=webpack&type=Issues&utf8=%E2%9C%93

gusano commented 7 years ago

any update on that?

gilbarbara commented 7 years ago

Hey guys, any news here? I'm unable to use CodeClimate since all my builds are broken because of this. Is it fixable? @abbyarmada @katwchen

abbyarmada commented 7 years ago

Hey @gilbarbara, I just pinged someone about this and we're looking into it. Thanks for your patience!

gdiggs commented 7 years ago

Hey @gilbarbara I just shipped something that I think will address this! I tested it on a few of your OSS repos. Can you try another build and let me know what your experience is like?

gilbarbara commented 7 years ago

hey @GordonDiggs I still got the error on codeclimate site. Is it in production yet or just the cli?

Ignoring the following rules that rely on module resolution:

* import/extensions
* import/no-unresolved
* import/no-extraneous-dependencies
* import/no-absolute-path
* import/no-duplicates
* import/no-named-as-default-member
module.js:471
    throw err;
    ^

Error: Cannot find module 'webpack'
...
gdiggs commented 7 years ago

@gilbarbara can you email me a link to where you see that? gordon[at]codeclimate[dot]com

gilbarbara commented 7 years ago

@GordonDiggs Did you get my email? Anything else I could do?

gilbarbara commented 7 years ago

@GordonDiggs Just to let you know the analysis worked in the CLI (0.6.8).

edit: maybe it worked because I have the node_modules locally. 😐

gilbarbara commented 7 years ago

@abbyarmada I'm getting pressured to cancel my organization subscription as we aren't getting proper reports since July. 😞

gdiggs commented 7 years ago

@gilbarbara I didn't realize you are on the eslint-4 channel. Let me port the changes there!

gilbarbara commented 6 years ago

@GordonDiggs Are these changes already on codeclimate.com runner?

gdiggs commented 6 years ago

@gilbarbara they are! If you're still having trouble, I would suggest removing the parts of your config that use the resolver stuff, as it is not supported on Code Climate right now

gilbarbara commented 6 years ago

humm, ok.

Can you say what's working and what's not? I'll try to turn off some stuff but still...

gilbarbara commented 6 years ago

Hey, I finally got the time to debug this and for my setup, the culprit was the import/export rule. Despite having import/export enabled flag set to false in my .codeclimate.yml, the engine still breaks. When I turn it off directly in my .eslintrc the error was gone...

Funny thing is I have the same config for more than 10 projects and this was the only one having problems. ¯_(ツ)_/¯