Broccoli plugin to run JSHint
Run JSHint on the provided node.
var JSHinter = require'broccoli-jshint';// Assuming someNode contains .js filesvar node = someNode;
Will look in the root of the provided node for a
.jshintrc. If you would prefer to use another specific root
for looking up your JSHint config, supply this option.
Default: input node root
Specify the path to the
.jshintrc that you would like to use. Use this option if you would like to use a
file from a path that is not in the same hierarchy as your input node (if it is use the
Should we log errors to the console?
true tests will not be generated.
The function used to generate test modules. You can provide a custom function for your client side testing framework of choice.
The function receives the following arguments:
relativePath- The relative path to the file being tested.
errors- A generated string of errors found.
Default generates QUnit style tests:
var path = require'path';return "module('" + pathdirnamerelativePath + '");";"test('" + relativePath + "' should pass jshint' " +" okpassed moduleName+" should pass jshint."+errors ? "\n"+errors : ''; " +";;
Allows you to provide a custom
console object. This is useful if you have to supress console output in CI for example.
A human-readable description for this plugin instance.
I know, right?
Running the tests:
npm installnpm test
This project is distributed under the MIT license.