Wrapper for JSHint to allow hinting of JSX files

npm install jsxhint
13 downloads in the last day
81 downloads in the last week
215 downloads in the last month

build status


A wrapper around JSHint to allow linting of files containing JSX syntax.

Accepts the same input and JSHint and emits the same output. Switches sent to jsxhint are forwarded on to jshint.

Glob parsing, ignores, and jshintrc parsing are all performed by jshint.


# Basic globbing
jsxhint -c ./other-directory/.jshintrc src/foo/*.jsx
# Accepts stdin with '-'
jsxhint - < src/file.jsx
# Exclude files
jsxhint --exclude excludeme.jsx src/foo/*.jsx


npm install -g jsxhint

Known Issues

At this time, react-tools inserts trailing whitespace after many tags when transforming jsx to js. Until this is resolved, you may want to set "trailing": false in your .jshintrc. See react#682.


  jsxhint [OPTIONS] [ARGS]

  -c, --config STRING    Custom configuration file
      --reporter STRING  Custom reporter (<PATH>|jslint|checkstyle)
      --exclude STRING   Exclude files matching the given filename pattern 
                         (same as .jsxhintignore) 
      --verbose          Show message codes
      --show-non-errors  Show additional data generated by jsxhint
  -e, --extra-ext STRING Comma-separated list of file extensions to use 
                         (default is .js) 
      --jslint-reporter  Use a jslint compatible reporter (DEPRECATED, use 
                         --reporter=jslint instead) 
      --checkstyle-reporter Use a CheckStyle compatible XML reporter 
                            (DEPRECATED, use --reporter=checkstyle 
  -v, --version          Display the current version
  -h, --help             Display help and usage details
npm loves you