{"name":"jshint-loader","version":"0.1.1","author":{"name":"Tobias Koppers @sokra"},"description":"jshint loader module for webpack","dependencies":{"jshint":"0.9.x"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/mit-license.php"}],"license":"MIT","_id":"jshint-loader@0.1.1","dist":{"shasum":"071acaaace8d24d523cc4bfcecab13c3a13022a5","tarball":"http://registry-npm.ywwl.com/jshint-loader/download/jshint-loader-0.1.1.tgz","integrity":"sha512-rfEXPaLbehnr7l/qaP7gGYeG9YC2XASGPBqi0h0G6pRShRMneO/VvbWNpKkgcb76YBMJOKqZuSTRrv1Ut11TxA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDaSOq2nvlmsS0DgMCr7TMVxLpko1FjjBNuJKb5inoF1AIhAL2YdmRF7UUOJPXfhcWFJ64l248eqkZTlc85Q9/f5ySS"}],"size":1414,"noattachment":false,"key":"/jshint-loader/-/jshint-loader-0.1.1.tgz"},"_npmVersion":"1.1.59","_npmUser":{"name":"sokra","email":"tobias.koppers@googlemail.com"},"maintainers":[{"name":"sokra","email":"tobias.koppers@googlemail.com"}],"directories":{},"readme":"[![npm][npm]][npm-url]\n[![deps][deps]][deps-url]\n[![test][test]][test-url]\n[![chat][chat]][chat-url]\n\n<div align=\"center\">\n  <!-- replace with accurate logo e.g from https://worldvectorlogo.com/ -->\n  <a href=\"https://github.com/webpack/webpack\">\n    <img width=\"200\" height=\"200\" vspace=\"\" hspace=\"25\"\n      src=\"https://cdn.rawgit.com/webpack/media/e7485eb2/logo/icon.svg\">\n  </a>\n  <h1>jshint Loader</h1>\n  <p>jshint loader for Webpack.<p>\n</div>\n\n<h2 align=\"center\">Install</h2>\n\n```bash\nnpm i jshint-loader --save\n```\n\n<h2 align=\"center\">Usage</h2>\n\nApply the jshint loader as pre/postLoader in your webpack configuration:\n\n``` javascript\nmodule.exports = {\n\tmodule: {\n\t\tpreLoaders: [\n\t\t\t{\n\t\t\t\ttest: /\\.js$/, // include .js files\n\t\t\t\texclude: /node_modules/, // exclude any and all files in the node_modules folder\n\t\t\t\tloader: \"jshint-loader\"\n\t\t\t}\n\t\t]\n\t},\n\n\t// more options in the optional jshint object\n\tjshint: {\n\t\t// any jshint option http://www.jshint.com/docs/options/\n\t\t// i. e.\n\t\tcamelcase: true,\n\n\t\t// jshint errors are displayed by default as warnings\n\t\t// set emitErrors to true to display them as errors\n\t\temitErrors: false,\n\n\t\t// jshint to not interrupt the compilation\n\t\t// if you want any file with jshint errors to fail\n\t\t// set failOnHint to true\n\t\tfailOnHint: false,\n\n\t\t// custom reporter function\n\t\treporter: function(errors) { }\n\t}\n}\n```\n\n<h2 align=\"center\">Custom reporter</h2>\n\nBy default, `jshint-loader` will provide a default reporter.\n\nHowever, if you prefer a custom reporter, pass a function under the `reporter` key in `jshint` options. (see *usage* above)\n\nThe reporter function will be passed an array of errors/warnings produced by jshint\nwith the following structure:\n```js\n[\n{\n    id:        [string, usually '(error)'],\n    code:      [string, error/warning code],\n    reason:    [string, error/warning message],\n    evidence:  [string, a piece of code that generated this error]\n    line:      [number]\n    character: [number]\n    scope:     [string, message scope;\n                usually '(main)' unless the code was eval'ed]\n\n    [+ a few other legacy fields that you don't need to worry about.]\n},\n// ...\n// more errors/warnings\n]\n```\n\nThe reporter function will be excuted with the loader context as `this`. You may emit messages using `this.emitWarning(...)` or `this.emitError(...)`. See [webpack docs on loader context](http://webpack.github.io/docs/loaders.html#loader-context).\n\n**Note:** jshint reporters are **not compatible** with jshint-loader!\nThis is due to the fact that reporter input is only processed from one file; not multiple files. Error reporting in this manner differs from [tranditional reporters](http://www.jshint.com/docs/reporters/) for jshint\nsince the loader plugin (i.e. jshint-loader) is executed for each source file; and thus the reporter is executed for each file.\n\nThe output in webpack CLI will usually be:\n```js\n...\n\nWARNING in ./path/to/file.js\n<reporter output>\n\n...\n```\n`\n\n<h2 align=\"center\">Maintainers</h2>\n\n<table>\n  <tbody>\n    <tr>\n      <td align=\"center\">\n        <img width=\"150\" height=\"150\"\n        src=\"https://avatars3.githubusercontent.com/u/166921?v=3&s=150\">\n        </br>\n        <a href=\"https://github.com/bebraw\">Juho Vepsäläinen</a>\n      </td>\n      <td align=\"center\">\n        <img width=\"150\" height=\"150\"\n        src=\"https://avatars2.githubusercontent.com/u/8420490?v=3&s=150\">\n        </br>\n        <a href=\"https://github.com/d3viant0ne\">Joshua Wiens</a>\n      </td>\n      <td align=\"center\">\n        <img width=\"150\" height=\"150\"\n        src=\"https://avatars3.githubusercontent.com/u/533616?v=3&s=150\">\n        </br>\n        <a href=\"https://github.com/SpaceK33z\">Kees Kluskens</a>\n      </td>\n      <td align=\"center\">\n        <img width=\"150\" height=\"150\"\n        src=\"https://avatars3.githubusercontent.com/u/3408176?v=3&s=150\">\n        </br>\n        <a href=\"https://github.com/TheLarkInn\">Sean Larkin</a>\n      </td>\n    </tr>\n  <tbody>\n</table>\n\n\n[npm]: https://img.shields.io/npm/v/jshint-loader.svg\n[npm-url]: https://npmjs.com/package/jshint-loader\n\n[deps]: https://david-dm.org/webpack-contrib/jshint-loader.svg\n[deps-url]: https://david-dm.org/webpack-contrib/jshint-loader\n\n[chat]: https://img.shields.io/badge/gitter-webpack%2Fwebpack-brightgreen.svg\n[chat-url]: https://gitter.im/webpack/webpack\n\n[test]: http://img.shields.io/travis/webpack-contrib/jshint-loader.svg\n[test-url]: https://travis-ci.org/webpack-contrib/jshint-loader\n","publish_time":1350855440963,"_cnpm_publish_time":1350855440963,"dist-tags":{"latest":"0.8.4"}}