Skip to content
This repository has been archived by the owner on Jul 18, 2019. It is now read-only.

.jshintrc "overrides" option causes warning #26

Open
bostrom opened this issue Sep 29, 2016 · 3 comments
Open

.jshintrc "overrides" option causes warning #26

bostrom opened this issue Sep 29, 2016 · 3 comments

Comments

@bostrom
Copy link

bostrom commented Sep 29, 2016

I just started using jshint-loader with an existing .jshintrc file containing an overrides section:

{
  "curly": true,
  ...
  "devel": true,
  "node": true,
  "overrides": {
    "app/**/*.js": {
      "devel": false,
      "undef": true,
      "globals": {
        "angular": true,
        "module": true,
        "require": true
      }
    },
    "app/**/test/**/*.js": {
      "devel": true,
      "undef": true,
      "jasmine": true,
      "globals": {
        "module": true,
        "inject": true
      }
    }
  }
}

This works fine with jshint itself and many IDEs, but jshint-loader throws this warning:

WARNING in ./app/js/resources/resource.js
jshint results in errors
  Bad option: 'overrides'. @ line 0 char 0

Could this be supported by jshint-loader as well, since it's supported by jshint?

Environment:
webpack 1.13.2
jshint: 2.9.3
jshint-loader: 0.8.3
npm: 3.10.3
node: 6.3.1

@bostrom bostrom changed the title .jshintrc "overrides" option causes error .jshintrc "overrides" option causes warning Sep 29, 2016
@kostasmanionis
Copy link
Collaborator

Hmm this option seems to be only supported by the cli, bummer :( We're using the node api.
It's more of a jshint issue, in a sense that its node api lacks this feature. But if we would wan't to support this, we would probably need to reimplement it in the loader. I'll explore this possibility a bit more.

@bostrom
Copy link
Author

bostrom commented Oct 8, 2016

Ah I see. I've used this successfully with jshint for Grunt before, but looking at their code it seems that they're indeed using the cli.

Bummer. Perhaps I should raise the node api vs cli issue over at jshint instead.

EDIT: seems to have been done already jshint/jshint#1726

@kostasmanionis
Copy link
Collaborator

Doesn't seem to be getting any traction though, been open for a while 😄 But this is definitely something we would need to support. Since we lint on file by file basis it shouldn't be too difficult to implement, so I guess we could add it to the loader.

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

No branches or pull requests

2 participants