Skip to content
forked from STRML/JSXHint

Wrapper around JSHint for linting JSX files. 100% compatible with existing tools using JSHint.

License

Notifications You must be signed in to change notification settings

roadhump/JSXHint

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

build status

#JSXHint 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.

##Examples

# 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 

##Installation 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.

##Usage

Usage:
  jsxhint [OPTIONS] [ARGS]

Options: 
  -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 
                            instead) 
  -v, --version          Display the current version
  -h, --help             Display help and usage details

About

Wrapper around JSHint for linting JSX files. 100% compatible with existing tools using JSHint.

Resources

License

Stars

Watchers

Forks

Packages

No packages published