grunt-contrib-jshint
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -66,30 +66,1 @@ # Usage examples | ||
``` | ||
#### Merging JSHint options and globals with a jshintrc file | ||
A simple way to use a project-specific `jshintrc` file, augmented with specific options for some targets. | ||
```js | ||
// Project configuration. | ||
grunt.initConfig({ | ||
jshint: { | ||
options: { | ||
jshintrc: '.jshintrc', | ||
}, | ||
webapp: { | ||
options: { | ||
globals: { | ||
jQuery: true, | ||
}, | ||
}, | ||
files: ['www/**/*.js'], | ||
}, | ||
server: { | ||
options: { | ||
node: true, | ||
}, | ||
files: ['api/**/*.js'], | ||
}, | ||
}, | ||
}); | ||
``` |
@@ -20,3 +20,3 @@ # Options | ||
If this filename is specified, options and globals defined therein will be used. Task and target options override the options within the `jshintrc` file. The `jshintrc` file must be valid JSON and looks something like this: | ||
If this filename is specified, options and globals defined therein will be used. The `jshintrc` file must be valid JSON and looks something like this: | ||
@@ -23,0 +23,0 @@ ```json |
{ | ||
"name": "grunt-contrib-jshint", | ||
"description": "Validate files with JSHint.", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"homepage": "https://github.com/gruntjs/grunt-contrib-jshint", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -48,3 +48,3 @@ # grunt-contrib-jshint [![Build Status](https://secure.travis-ci.org/gruntjs/grunt-contrib-jshint.png?branch=master)](http://travis-ci.org/gruntjs/grunt-contrib-jshint) | ||
If this filename is specified, options and globals defined therein will be used. Task and target options override the options within the `jshintrc` file. The `jshintrc` file must be valid JSON and looks something like this: | ||
If this filename is specified, options and globals defined therein will be used. The `jshintrc` file must be valid JSON and looks something like this: | ||
@@ -135,40 +135,12 @@ ```json | ||
###### Merging JSHint options and globals with a jshintrc file | ||
A simple way to use a project-specific `jshintrc` file, augmented with specific options for some targets. | ||
```js | ||
// Project configuration. | ||
grunt.initConfig({ | ||
jshint: { | ||
options: { | ||
jshintrc: '.jshintrc', | ||
}, | ||
webapp: { | ||
options: { | ||
globals: { | ||
jQuery: true, | ||
}, | ||
}, | ||
files: ['www/**/*.js'], | ||
}, | ||
server: { | ||
options: { | ||
node: true, | ||
}, | ||
files: ['api/**/*.js'], | ||
}, | ||
}, | ||
}); | ||
``` | ||
## Release History | ||
* 2013-03-12 v0.3.0 Bump to JSHint 1.1.0. Add force option to report JSHint errors but not fail the task. Add error/warning code to message. Allow task level options to override jshintrc file. | ||
* 2013-02-25 v0.2.0 Bump to JSHint 1.0 | ||
* 2013-02-14 v0.1.1 First official release for Grunt 0.4.0. | ||
* 2013-01-17 v0.1.1rc6 Updating grunt/gruntplugin dependencies to rc6. Changing in-development grunt/gruntplugin dependency versions from tilde version ranges to specific versions. | ||
* 2013-01-08 v0.1.1rc5 Updating to work with grunt v0.4.0rc5. Switching to this.filesSrc api. | ||
* 2012-10-17 v0.1.0 Work in progress, not yet officially released. | ||
* 2013-04-04 v0.4.0 Revert task level options to override jshintrc files. | ||
* 2013-03-13 v0.3.0 Bump to JSHint 1.1.0. Add force option to report JSHint errors but not fail the task. Add error/warning code to message. Allow task level options to override jshintrc file. | ||
* 2013-02-26 v0.2.0 Bump to JSHint 1.0 | ||
* 2013-02-15 v0.1.1 First official release for Grunt 0.4.0. | ||
* 2013-01-18 v0.1.1rc6 Updating grunt/gruntplugin dependencies to rc6. Changing in-development grunt/gruntplugin dependency versions from tilde version ranges to specific versions. | ||
* 2013-01-09 v0.1.1rc5 Updating to work with grunt v0.4.0rc5. Switching to this.filesSrc api. | ||
* 2012-10-18 v0.1.0 Work in progress, not yet officially released. | ||
@@ -179,2 +151,2 @@ --- | ||
*This file was generated on Wed Mar 13 2013 21:52:51.* | ||
*This file was generated on Thu Apr 04 2013 21:33:36.* |
@@ -22,7 +22,5 @@ /* | ||
// Merge JSHint options from a specified jshintrc file. | ||
// Read JSHint options from a specified jshintrc file. | ||
if (options.jshintrc) { | ||
var rc = grunt.file.readJSON(options.jshintrc); | ||
grunt.util._.defaults(options, rc); | ||
delete options.jshintrc; | ||
options = grunt.file.readJSON(options.jshintrc); | ||
} | ||
@@ -29,0 +27,0 @@ // If globals weren't specified, initialize them as an empty object. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
19221
213
150