{"_id":"@applaud/eslint-loader","name":"@applaud/eslint-loader","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@applaud/eslint-loader","version":"1.0.0","description":"eslint loader (for webpack)","keywords":["lint","linter","eslint","loader","webpack","applaud"],"repository":{"type":"git","url":"git+https://github.com/Applaud-devpack/eslint-loader.git"},"author":{"name":"Applaud"},"license":"MIT","peerDependencies":{"eslint":">=1.6.0 <7.0.0","webpack":">=2.0.0 <5.0.0"},"dependencies":{"loader-fs-cache":"^1.0.0","loader-utils":"^2.0.3","object-assign":"^4.0.1","object-hash":"^1.1.4","rimraf":"^2.6.1"},"devDependencies":{"ava":"^0.17.0","eslint":"^6.0.1","eslint-config-i-am-meticulous":"^11.0.0","eslint-friendly-formatter":"^2.0.4","husky":"^0.14.3","mkdirp":"^0.5.1","npmpub":"^4.0.1","prettier":"^1.13.7","pretty-quick":"^1.6.0","webpack":"^4.0.0"},"scripts":{"precommit":"pretty-quick --staged","lint":"eslint .","ava":"ava","test":"npm run lint && npm run ava","release":"npmpub"},"eslintConfig":{"extends":"eslint-config-i-am-meticulous","rules":{"no-var":0,"prefer-const":0}},"ava":{"files":["test/*.js"],"verbose":true},"gitHead":"37cde5ecb92974a953da0f49b5f5e4e704eab1ed","bugs":{"url":"https://github.com/Applaud-devpack/eslint-loader/issues"},"homepage":"https://github.com/Applaud-devpack/eslint-loader#readme","_id":"@applaud/eslint-loader@1.0.0","_nodeVersion":"10.24.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-Utoy/UPVXsWK5/AYB97J+sbR1khpItLME2kvrUsu/72dAFLBxF+u8pYXVsMYM+Z7iZy+ehf1F+kjxZE9d3Eh+g==","shasum":"1d3d158eab5034dcbe7b29879e40d09d7d337d99","tarball":"https://registry.npmjs.org/@applaud/eslint-loader/-/eslint-loader-1.0.0.tgz","fileCount":5,"unpackedSize":24356,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDD54PNx34dva0DIwZfnBNn3XP/j5FuS4Is3KedaSgKVgIgKZwNRL3JAr9Ru6A052gGqAm0NWm6/ewGg8Ag5bl0MTo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjez9VACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp+gg/9GougXkbKA4INt2SULQTNXU0IdTHqoTj4bjEhP1KNVMaqNhjC\r\nP/kImeWmWdgMHKvEAB4n55kkPYbG1lWSpVgX+7+wnbb+0sbBteN2F9jR8dGP\r\nx2EDettYhE25RjlEg5E4FgbLmxN4mF/gfXPp0or1rACbd003uwZBndR1+jQy\r\nO19vYU/lL0SIb9jcj03O1P8Eyp06EIkOwFiXD37D41+/Yo4eZ1TIrN7M6abF\r\nZtyO4y4q1UpuNN1LblfOACXrGvgtrbxg/XdqZl7xzzaJukD1ZdjHi4VGPGfw\r\nmiFht36PEbdEz5BLd9+vBRpdgcrcaurJvupTgxuuGcsbjt7KP6y3gpDBHoxy\r\nLTVCAvsRY0YR8eOxRFHICQ5xxTrvqeSaXNiYEkrkFFg6FsQP/jESmWdXwAtE\r\ntxhOodIoojZVjIPqJ4oaQd7QsxG2xcgKqpA/iC2EIEzli0kcW9ay3sxQpoX+\r\nmlHvw3sCYnD+t/3xnVWIxP3DMysvilEpZIYDc7B2FTRFfxpgoM5FpJmK3BNk\r\nGspLMoEeSeV8r62oLURIjU4QcUbdWkkVIETg1XJkBXDnBOtpGNBxeTm6G4KM\r\nPC3khoM2uLnRcQtzGfWtwNFuItPBeq83e/H+gwLXJIH1kXiKTY39Y4FQ/ySR\r\nmU7dSN4f3eNYM7ZL5ncOqFR6IBdrTnnV2kM=\r\n=NB1N\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"mahesh_reddy","email":"applaud.devpack@gmail.com"},"directories":{},"maintainers":[{"name":"mahesh_reddy","email":"applaud.devpack@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-loader_1.0.0_1669021524844_0.9807466106782983"},"_hasShrinkwrap":false}},"time":{"created":"2022-11-21T09:05:24.757Z","1.0.0":"2022-11-21T09:05:25.045Z","modified":"2022-11-21T09:05:25.281Z"},"maintainers":[{"name":"mahesh_reddy","email":"applaud.devpack@gmail.com"}],"description":"eslint loader (for webpack)","homepage":"https://github.com/Applaud-devpack/eslint-loader#readme","keywords":["lint","linter","eslint","loader","webpack","applaud"],"repository":{"type":"git","url":"git+https://github.com/Applaud-devpack/eslint-loader.git"},"author":{"name":"Applaud"},"bugs":{"url":"https://github.com/Applaud-devpack/eslint-loader/issues"},"license":"MIT","readme":"# @applaud/eslint-loader [![Build Status](https://travis-ci.org/webpack-contrib/eslint-loader.svg?branch=master)](https://travis-ci.org/webpack-contrib/eslint-loader)\n\n> eslint loader for webpack\n\n## Install\n\n```console\n$ npm install @applaud/eslint-loader --save-dev\n```\n\n**NOTE**: You also need to install `eslint` from npm, if you haven't already:\n\n```console\n$ npm install eslint --save-dev\n```\n\n## Usage\n\nIn your webpack configuration\n\n```js\nmodule.exports = {\n  // ...\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        exclude: /node_modules/,\n        loader: \"eslint-loader\",\n        options: {\n          // eslint options (if necessary)\n        }\n      }\n    ]\n  }\n  // ...\n};\n```\n\nWhen using with transpiling loaders (like `babel-loader`), make sure they are in correct order\n(bottom to top). Otherwise files will be checked after being processed by `babel-loader`\n\n```js\nmodule.exports = {\n  // ...\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        exclude: /node_modules/,\n        use: [\"babel-loader\", \"eslint-loader\"]\n      }\n    ]\n  }\n  // ...\n};\n```\n\nTo be safe, you can use `enforce: \"pre\"` section to check source files, not modified\nby other loaders (like `babel-loader`)\n\n```js\nmodule.exports = {\n  // ...\n  module: {\n    rules: [\n      {\n        enforce: \"pre\",\n        test: /\\.js$/,\n        exclude: /node_modules/,\n        loader: \"eslint-loader\"\n      },\n      {\n        test: /\\.js$/,\n        exclude: /node_modules/,\n        loader: \"babel-loader\"\n      }\n    ]\n  }\n  // ...\n};\n```\n\n### Options\n\nYou can pass [eslint options](http://eslint.org/docs/developer-guide/nodejs-api#cliengine)\nusing standard webpack [loader options](https://webpack.js.org/configuration/module/#useentry).\n\nNote that the config option you provide will be passed to the `CLIEngine`.\nThis is a different set of options than what you'd specify in `package.json` or `.eslintrc`.\nSee the [eslint docs](http://eslint.org/docs/developer-guide/nodejs-api#cliengine) for more detail.\n\n#### `fix` (default: false)\n\nThis option will enable\n[ESLint autofix feature](http://eslint.org/docs/user-guide/command-line-interface#fix).\n\n**Be careful: this option will change source files.**\n\n#### `cache` (default: false)\n\nThis option will enable caching of the linting results into a file.\nThis is particularly useful in reducing linting time when doing a full build.\n\nThis can either be a `boolean` value or the cache directory path(ex: `'./.eslint-loader-cache'`).\n\nIf `cache: true` is used, the cache file is written to the `./node_modules/.cache` directory.\nThis is the recommended usage.\n\n#### `formatter` (default: eslint stylish formatter)\n\nLoader accepts a function that will have one argument: an array of eslint messages (object).\nThe function must return the output as a string.\nYou can use official eslint formatters.\n\n```js\nmodule.exports = {\n  entry: \"...\",\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        exclude: /node_modules/,\n        loader: \"eslint-loader\",\n        options: {\n          // several examples !\n\n          // default value\n          formatter: require(\"eslint/lib/formatters/stylish\"),\n\n          // community formatter\n          formatter: require(\"eslint-friendly-formatter\"),\n\n          // custom formatter\n          formatter: function(results) {\n            // `results` format is available here\n            // http://eslint.org/docs/developer-guide/nodejs-api.html#executeonfiles()\n\n            // you should return a string\n            // DO NOT USE console.*() directly !\n            return \"OUTPUT\";\n          }\n        }\n      }\n    ]\n  }\n};\n```\n\n#### `eslintPath` (default: \"eslint\")\n\nPath to `eslint` instance that will be used for linting.  \nIf the `eslintPath` is a folder like a official eslint, or specify a `formatter` option. now you dont have to install `eslint` .\n\n```js\nmodule.exports = {\n  entry: \"...\",\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        exclude: /node_modules/,\n        loader: \"eslint-loader\",\n        options: {\n          eslintPath: path.join(__dirname, \"reusable-eslint\")\n        }\n      }\n    ]\n  }\n};\n```\n\n#### Errors and Warning\n\n**By default the loader will auto adjust error reporting depending\non eslint errors/warnings counts.**\nYou can still force this behavior by using `emitError` **or** `emitWarning` options:\n\n##### `emitError` (default: `false`)\n\nLoader will always return errors if this option is set to `true`.\n\n```js\nmodule.exports = {\n  entry: \"...\",\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        exclude: /node_modules/,\n        loader: \"eslint-loader\",\n        options: {\n          emitError: true\n        }\n      }\n    ]\n  }\n};\n```\n\n##### `emitWarning` (default: `false`)\n\nLoader will always return warnings if option is set to `true`. If you're using hot module replacement, you may wish to enable this in development, or else updates will be skipped when there's an eslint error.\n\n#### `quiet` (default: `false`)\n\nLoader will process and report errors only and ignore warnings if this option is set to true\n\n```js\nmodule.exports = {\n  entry: \"...\",\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        exclude: /node_modules/,\n        loader: \"eslint-loader\",\n        options: {\n          quiet: true\n        }\n      }\n    ]\n  }\n};\n```\n\n##### `failOnWarning` (default: `false`)\n\nLoader will cause the module build to fail if there are any eslint warnings.\n\n```js\nmodule.exports = {\n  entry: \"...\",\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        exclude: /node_modules/,\n        loader: \"eslint-loader\",\n        options: {\n          failOnWarning: true\n        }\n      }\n    ]\n  }\n};\n```\n\n##### `failOnError` (default: `false`)\n\nLoader will cause the module build to fail if there are any eslint errors.\n\n```js\nmodule.exports = {\n  entry: \"...\",\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        exclude: /node_modules/,\n        loader: \"eslint-loader\",\n        options: {\n          failOnError: true\n        }\n      }\n    ]\n  }\n};\n```\n\n##### `outputReport` (default: `false`)\n\nWrite the output of the errors to a file, for example a checkstyle xml file for use for reporting on Jenkins CI\n\nThe `filePath` is relative to the webpack config: output.path\nYou can pass in a different formatter for the output file, if none is passed in the default/configured formatter will be used\n\n```js\nmodule.exports = {\n  entry: \"...\",\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        exclude: /node_modules/,\n        loader: \"eslint-loader\",\n        options: {\n          outputReport: {\n            filePath: \"checkstyle.xml\",\n            formatter: require(\"eslint/lib/formatters/checkstyle\")\n          }\n        }\n      }\n    ]\n  }\n};\n```\n\n## Gotchas\n\n### NoErrorsPlugin\n\n`NoErrorsPlugin` prevents webpack from outputting anything into a bundle. So even ESLint warnings\nwill fail the build. No matter what error settings are used for `eslint-loader`.\n\nSo if you want to see ESLint warnings in console during development using `WebpackDevServer`\nremove `NoErrorsPlugin` from webpack config.\n\n### Defining `configFile` or using `eslint -c path/.eslintrc`\n\nBear in mind that when you define `configFile`, `eslint` doesn't automatically look for\n`.eslintrc` files in the directory of the file to be linted.\nMore information is available in official eslint documentation in section [_Using Configuration Files_](http://eslint.org/docs/user-guide/configuring#using-configuration-files).\nSee [#129](https://github.com/webpack-contrib/eslint-loader/issues/129).\n\n---\n\n## Changelog\n\n[Changelog](CHANGELOG.md)\n\n## License\n\n[MIT](./LICENSE)\n","readmeFilename":"README.md"}