sindresorhus / grunt-eslint

Validate files with ESLint
MIT License
200 stars 72 forks source link

Grunt eslint is not doing anything #142

Closed jitendravyas closed 7 years ago

jitendravyas commented 7 years ago

It just stay in this mode, I waited for 10 minutes

2017-06-12 19-29-53

Node 6 on latest OSX.

.eslintrc file

{
    "plugins": [
        "prettier"
    ],
  "env": {
    "browser": true,
    "jquery": true,
    "node": true
  },
  "globals": {
    "JSON": true,
    "angular": false,
    "require": false,
    "define": false,
    "defineTest": false,
    "expect": false,
    "jasmine": false,
    "runs": false,
    "waits": false,
    "waitsFor": false,
    "it": false,
    "xit": false,
    "describe": false,
    "xdescribe": false,
    "protractor": false,
    "by": false,
    "browser": false,
    "element": false,
    "beforeEach": false,
    "afterEach": false,
    "inject": false,
    "module": false,
    "errorReport": false,
    "printStackTrace": false,
    "spyOn": false,
    "Transifex": false
  },
  "rules": {
    "prettier/prettier": "error",
    "no-bitwise": 2,
    "camelcase": 2,
    "curly": 2,
    "eqeqeq": 2,
    "guard-for-in": 2,
    "wrap-iife": [
      2,
      "any"
    ],
    "indent": [
      2,
      4,
      {
        "SwitchCase": 1
      }
    ],
    "no-use-before-define": 0,
    "new-cap": 2,
    "no-caller": 2,
    "no-empty": 2,
    "no-new": 2,
    "no-plusplus": 0,
    "quotes": [
      2,
      "single"
    ],
    "no-undef": 0,
    "no-unused-vars": 2,
    "strict": 0,
    "max-params": [
      2,
      10
    ],
    "max-depth": [
      2,
      10
    ],
    "max-statements": [
      2,
      200
    ],
    "complexity": 0,
    "max-len": [
      2,
      {
        "code": 200,
        "ignoreComments": true
      }
    ],
    "semi": 0,
    "no-cond-assign": 0,
    "no-debugger": 0,
    "no-eq-null": 0,
    "no-eval": 0,
    "no-unused-expressions": 0,
    "block-scoped-var": 0,
    "no-iterator": 0,
    "linebreak-style": 0,
    "comma-style": [
      2,
      "first"
    ],
    "no-loop-func": 0,
    "no-multi-str": 0,
    "no-proto": 0,
    "no-script-url": 0,
    "no-shadow": 2,
    "dot-notation": 2,
    "no-new-func": 0,
    "no-new-wrappers": 0,
    "no-invalid-this": 0
  },
      "extends": [
            "prettier"
    ]
}
mobilemind commented 7 years ago

Not sure if this help you or the repo teams, but I copied your .eslintrc to my own javascript project and grunt + eslint worked (after I added a few dependencies to my repo for prettier and your eslint version (^3.14.1).

Maybe there are differences with newer versions of node or the eslint 4.0.0 that was releases yesterday?

I'm on macOS Sierra 10.12.5 (latest general release).

$node --version
v8.1.0
$npm --version
5.0.3
$grunt --version
grunt-cli v1.2.0
grunt v1.0.1

and from package.json:

  "devDependencies": {
    "eslint": "^3.14.1",
    "eslint-config-prettier": ">2.1.0",
    "grunt": ">1.0.0",
    "grunt-contrib-nodeunit": ">=1.0.0",
    "grunt-contrib-uglify": ">3.0.0",
    "grunt-eslint": ">=19.0.0",
    "grunt-yamllint": ">=0.3.0",
    "js2uri": ">=1.4.4",
    "prettier": ">= 0.11.0"
  }

Hope that helps someone.

enure commented 7 years ago

Running grunt eslint --debug --verbose would give you more information to work with.

sindresorhus commented 7 years ago

Closing as this seems to be more of a support question. Happy to take another look if someone submits a failing test or links to a test case in the form of a minimal repo that reproduces the issue.