I'm not affiliated with eslint, but I thought I'd chime in. My first 
thought is that you have different versions of eslint at play.

A quick look at the package.json file of gruntify-eslint on github shows 
that it pulls down "eslint": ">=0.24.1" which should get you the latest and 
greatest. Which makes me wonder whether you have an npm-shrinkwrap.json 
file that may have locked you to a previous version of eslint 
in gruntify-eslint…?

On Wednesday, August 12, 2015 at 4:06:45 PM UTC-4, Peter Kosenko wrote:
>
> I am not an expert in the eslint linting rules yet, but I have noticed 
> that I am getting different responses from eslint depending on whether I 
> run it directly on a file, or on whether it is launched by Grunt and 
> included in the grunt output.
>
> You might want to check this out to see if you get any similar behavior.  
> That is all that I am suggesting here -- that the eslint group try to 
> compare output between the two contexts (eslint command line and grunt 
> command line).
>
> I can't tell yet whether this is the result of grunt, gruntify-eslint (the 
> loader I am using) or eslint itself, but here is the grunt configuration:
>
> I have files grouped in gunt configuration:
>
>     // Using gruntify-eslint
>     eslint: {
>       nodeFiles: {              // nothing in here yet actually
>         files: {
>           src: ['server/**/*.js']
>         }
>       },
>
>       browserFiles: {
>         files: {
>           // All javascript in the project directory, except those 
> excluded by .eslintignore  -- I am testing a file in this group
>           src: ['*.js']
>         }
>       },
>
>       testFiles: {
>         files: {
>           // all test files except those exclused by .eslintignore
>           src: ['test/*.js']
>         }
>       }
>     }
>
> ************************
>
> $ grunt eslint:browserFiles
> Running "eslint:browserFiles" (eslint) task
>
> [NO ngPerformance.js errors reported, since I fixed what was found.]
>
>
> $ eslint ngPerformance.js
>
> ngPerformance.js
>    1:0  error  Unexpected space between function name and paren  
> no-spaced-func
>    5:2  error  Expected space or tab after /* in comment         
> spaced-comment
>   18:3  error  Unnecessary semicolon                             
> no-extra-semi
>
> - 3 problems (3 errors, 0 warnings)
>
>
> ************
> The issues:
>
>  1:0    (function (angular) {        there is NO function name actually -- 
> a bug?
>  5:2     /**
>           * @ngdoc directive        in function header multi-line comment
>  18:3   { };                function body with semi after
>
>
> ********************
> I also noticed that when I moved 'use strict' to the beginning of the 
> file, the eslint test is fine with it but the grunt test shows an error.
>
>   'use strict';   at the beginning of the file
>
> $grunt eslint:browserFiles
>
> ngPerformance.js
>   1:1  error  Use the function form of "use strict"  strict
>   2:2  error  Use the function form of "use strict"  strict 
>
> $ eslint ngPerformance.js
>
> [No errors shown.]
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"ESLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to