package.json 5.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. {
  2. "name": "grunt-contrib-jshint",
  3. "description": "Validate files with JSHint.",
  4. "version": "0.1.1",
  5. "homepage": "https://github.com/gruntjs/grunt-contrib-jshint",
  6. "author": {
  7. "name": "Grunt Team",
  8. "url": "http://gruntjs.com/"
  9. },
  10. "repository": {
  11. "type": "git",
  12. "url": "git://github.com/gruntjs/grunt-contrib-jshint.git"
  13. },
  14. "bugs": {
  15. "url": "https://github.com/gruntjs/grunt-contrib-jshint/issues"
  16. },
  17. "licenses": [
  18. {
  19. "type": "MIT",
  20. "url": "https://github.com/gruntjs/grunt-contrib-jshint/blob/master/LICENSE-MIT"
  21. }
  22. ],
  23. "main": "Gruntfile.js",
  24. "engines": {
  25. "node": ">= 0.8.0"
  26. },
  27. "scripts": {
  28. "test": "grunt test"
  29. },
  30. "dependencies": {
  31. "jshint": "~0.9.0"
  32. },
  33. "devDependencies": {
  34. "grunt-contrib-nodeunit": "~0.1.2",
  35. "grunt-contrib-internal": "~0.4.2",
  36. "grunt": "~0.4.0"
  37. },
  38. "peerDependencies": {
  39. "grunt": "~0.4.0"
  40. },
  41. "keywords": [
  42. "gruntplugin"
  43. ],
  44. "contributors": [
  45. {
  46. "name": "\"Cowboy\" Ben Alman",
  47. "url": "http://benalman.com/"
  48. },
  49. {
  50. "name": "Tyler Kellen",
  51. "url": "http://goingslowly.com/"
  52. }
  53. ],
  54. "readme": "# 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)\n\n> Validate files with JSHint.\n\n\n\n## Getting Started\nThis plugin requires Grunt `~0.4.0`\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm install grunt-contrib-jshint --save-dev\n```\n\nOne the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-contrib-jshint');\n```\n\n\n\n\n## Jshint task\n_Run this task with the `grunt jshint` command._\n\nTask targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide.\n### Options\n\nAny specified option will be passed through directly to [JSHint][], thus you can specify any option that JSHint supports. See the [JSHint documentation][] for a list of supported options.\n\n[JSHint]: http://www.jshint.com/\n[JSHint documentation]: http://www.jshint.com/docs/\n\nA few additional options are supported:\n\n#### globals\nType: `Object`\nDefault value: `null`\n\nA map of global variables, with keys as names and a boolean value to determine if they are assignable. This is not a standard JSHint option, but is passed into the `JSHINT` function as its third argument. See the [JSHint documentation][] for more information.\n\n#### jshintrc\nType: `String`\nDefault value: `null`\n\nIf this filename is specified, options and globals defined therein will be used. The `jshintrc` file must be valid JSON and looks something like this:\n\n```json\n{\n \"curly\": true,\n \"eqnull\": true,\n \"eqeqeq\": true,\n \"undef\": true,\n \"globals\": {\n \"jQuery\": true\n }\n}\n```\n\n### Usage examples\n\n#### Wildcards\nIn this example, running `grunt jshint:all` (or `grunt jshint` because `jshint` is a [multi task][]) will lint the project's Gruntfile as well as all JavaScript files in the `lib` and `test` directories and their subdirectores, using the default JSHint options.\n\n```js\n// Project configuration.\ngrunt.initConfig({\n jshint: {\n all: ['Gruntfile.js', 'lib/**/*.js', 'test/**/*.js']\n }\n});\n```\n\n#### Linting before and after concatenating\nIn this example, running `grunt jshint` will lint both the \"beforeconcat\" set and \"afterconcat\" sets of files. This is not ideal, because `dist/output.js` may get linted before it gets created via the [grunt-contrib-concat plugin](https://github.com/gruntjs/grunt-contrib-concat) `concat` task.\n\nIn this case, you should lint the \"beforeconcat\" files first, then concat, then lint the \"afterconcat\" files, by running `grunt jshint:beforeconcat concat jshint:afterconcat`.\n\n```js\n// Project configuration.\ngrunt.initConfig({\n concat: {\n dist: {\n src: ['src/foo.js', 'src/bar.js'],\n dest: 'dist/output.js'\n }\n },\n jshint: {\n beforeconcat: ['src/foo.js', 'src/bar.js'],\n afterconcat: ['dist/output.js']\n }\n});\n```\n\n#### Specifying JSHint options and globals\n\nIn this example, custom JSHint options are specified. Note that when `grunt jshint:uses_defaults` is run, those files are linted using the default options, but when `grunt jshint:with_overrides` is run, those files are linted using _merged_ task/target options.\n\n```js\n// Project configuration.\ngrunt.initConfig({\n jshint: {\n options: {\n curly: true,\n eqeqeq: true,\n eqnull: true,\n browser: true,\n globals: {\n jQuery: true\n },\n },\n uses_defaults: ['dir1/**/*.js', 'dir2/**/*.js'],\n with_overrides: {\n options: {\n curly: false,\n undef: true,\n },\n files: {\n src: ['dir3/**/*.js', 'dir4/**/*.js']\n },\n }\n },\n});\n```\n\n\n## Release History\n\n * 2013-02-14   v0.1.1   First official release for Grunt 0.4.0.\n * 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.\n * 2013-01-08   v0.1.1rc5   Updating to work with grunt v0.4.0rc5. Switching to this.filesSrc api.\n * 2012-10-17   v0.1.0   Work in progress, not yet officially released.\n\n---\n\nTask submitted by [\"Cowboy\" Ben Alman](http://benalman.com/)\n\n*This file was generated on Mon Feb 18 2013 08:53:58.*\n",
  55. "readmeFilename": "README.md",
  56. "_id": "[email protected]",
  57. "_from": "grunt-contrib-jshint@~0.1"
  58. }