mocha-jshint
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "mocha-jshint", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "run JSHint as mocha tests", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -13,3 +13,3 @@ mocha-jshint | ||
----- | ||
Mocha defaults to looking for your test specs in the `test` folder of yoour project. | ||
Mocha defaults to looking for your test specs in the `test` folder of your project. | ||
Add this file as `test/JSHint.spec.js` in your project, with the following content: | ||
@@ -28,2 +28,14 @@ | ||
configuring jshint | ||
------------------ | ||
In the root of your project you can add a `.jshintignore` file, where each line is a file or directory for JSHint to ignore | ||
and not check for errors. (see this project for an example) | ||
At the root of your project you can add a `.jshintrc` file, that specifies what options you want JSHint to run with | ||
(see this project for an example) | ||
You can also add a `.jshintrc` file to any subdirectory of your project, to override the .jshintrc settings in the root. | ||
For example in this project I allow some global variables in the `test` folder. Global variables that are set when I | ||
run mocha tests. Global variables that are only allowed to be used, in the .js files in the test folder | ||
Why? | ||
@@ -30,0 +42,0 @@ --- |
@@ -11,3 +11,3 @@ var path = require('path'); | ||
} | ||
err.message += 'JSHint error: ' + error.reason + ' ' + file + ':' + error.line + ':' + error.character; | ||
err.message = err.message || 'JSHint error(s)'; | ||
err.stack += error.reason + '\n at (' + path.resolve(file) + ':' + error.line + ':' + error.character + ')'; | ||
@@ -14,0 +14,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12669
46