sindresorhus / grunt-eslint

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

ext option is not honored #153

Closed ghost closed 6 years ago

ghost commented 6 years ago

I have a json file in the service directory that isn't properly formatted, and I'm expecting the eslint-plugin-json to detect the issue.

This conf doesn't work:

eslint: {
    options: {
        configFile: '.eslintrc.js',
        ext: '.json,.js'
    },
    src: ['service']
}

If I explicitly set the src, it finds it:

eslint: {
    options: {
        configFile: '.eslintrc.js',
        ext: '.json,.js'
    },
    src: ['service/support.json']
}
ghost commented 6 years ago

After a little bit more digging, found that the option is extensions (and not ext):

https://github.com/eslint/eslint/blob/master/lib/cli-engine.js#L51