JSPM

jshint-checkstyle-reporter

0.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q68864F

JSHint checkstyle file reporter

Package Exports

  • jshint-checkstyle-reporter

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jshint-checkstyle-reporter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

JSHint checkstyle file reporter

Writes checkstyle output to a file. This can be used to report JSHint results to Jenkins.

Usage

Standard JSHint cli

# optional: specify a different filename, default: checkstyle.xml
export JSHINT_CHECKSTYLE_FILE="jshint.xml"
# run jshint
jshint --reporter node_modules/jshint-checkstyle-reporter *.js subfolder/*.js sub/subfolder.js

As of 08/20/2014 JSHint's --reporter checkstyle reporter always logs everything as level error resulting in <error severity="error" ... /> for every xml entry. I made this tool for that purpose, it translates the given issue code to the actual severity level resulting in proper logging.

Like so:

<error line="227" column="44" severity="error" message="Too many errors. (16% scanned)." source="jshint.E043" />
<error line="42" column="14" severity="warning" message="Missing semicolon." source="jshint.W033" />

This way Jenkins actually registers the different levels (error and warning)

The message codes are up to date as of 08/20/2014