tillarnold/grunt-jsxhint

Unclear how to use

Closed this issue · 1 comments

I'm not understanding how to use this grunt task. It doesn't seem to be processing my .jsx files.

I have both grunt-jsxhint and grunt-contrib-jshint installed.

My GruntFile.js

module.exports = function (grunt) {
    grunt.initConfig({
        jshint: {
            options: {
                jshintrc: '.jshintrc'
            },
            all: {
                src: [
                    'js/**/*.js',
                    'js/**/*.jsx'
                ]
            }
        }
    });

    require('load-grunt-tasks')(grunt, {
        pattern: ["grunt-*"]
    });
};

However, when I run "grunt jshint" only the .js files are validated, and there is no option to run "grunt jsxhint" and no option to specify that the 'jshint' task should use 'grunt-jsxhint'.

The issue was caused by the fact that my .jshintignore file had this line:

**/*.jsx

I'll have to find some other way to tell my editor to not run JSHint on .jsx files.