{"name":"stylelint-webpack-plugin","version":"2.1.0","description":"A Stylelint plugin for webpack","license":"MIT","repository":{"type":"git","url":"git+https://github.com/webpack-contrib/stylelint-webpack-plugin.git"},"author":{"name":"Javier Sánchez-Marín","email":"javiersanchezmarin@gmail.com"},"contributors":[{"name":"Ricardo Gobbo de Souza","email":"ricardogobbosouza@yahoo.com.br"}],"homepage":"https://github.com/webpack-contrib/stylelint-webpack-plugin","bugs":{"url":"https://github.com/webpack-contrib/stylelint-webpack-plugin/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/webpack"},"main":"dist/cjs.js","types":"declarations/index.d.ts","engines":{"node":">= 10.13.0"},"scripts":{"start":"npm run build -- -w","clean":"del-cli dist declarations","prebuild":"npm run clean","build:types":"tsc --declaration --emitDeclarationOnly --outDir declarations && prettier \"declarations/**/*.ts\" --write","build:code":"cross-env NODE_ENV=production babel src -d dist --copy-files","build":"npm-run-all -p \"build:**\"","commitlint":"commitlint --from=master","security":"npm audit","lint:prettier":"prettier --list-different .","lint:js":"eslint --cache .","lint:types":"tsc --pretty --noEmit","lint":"npm-run-all -l -p \"lint:**\"","test:only":"cross-env NODE_ENV=test jest","test:watch":"npm run test:only -- --watch","test:coverage":"npm run test:only -- --collectCoverageFrom=\"src/**/*.js\" --coverage","pretest":"npm run lint","test":"npm run test:coverage","prepare":"npm run build","release":"standard-version","defaults":"webpack-defaults"},"peerDependencies":{"stylelint":"^13.0.0","webpack":"^4.0.0 || ^5.0.0"},"dependencies":{"arrify":"^2.0.1","micromatch":"^4.0.2","schema-utils":"^2.7.0"},"devDependencies":{"@babel/cli":"^7.10.1","@babel/core":"^7.10.2","@babel/preset-env":"^7.10.2","@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@types/micromatch":"^4.0.1","@types/stylelint":"^9.10.1","@types/webpack":"^4.41.17","@webpack-contrib/defaults":"^6.3.0","@webpack-contrib/eslint-config-webpack":"^3.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.0.1","cross-env":"^7.0.2","del":"^5.1.0","del-cli":"^3.0.1","eslint":"^7.2.0","eslint-config-prettier":"^6.11.0","eslint-friendly-formatter":"^4.0.1","eslint-plugin-import":"^2.21.2","file-loader":"^6.0.0","husky":"^4.2.5","jest":"^26.0.1","lint-staged":"^10.2.10","npm-run-all":"^4.1.5","prettier":"^2.0.5","standard-version":"^8.0.0","stylelint":"^13.6.0","typescript":"^3.9.5","webpack":"^4.43.0"},"keywords":["stylelint","lint","linter","plugin","webpack"],"gitHead":"b7cfe0a7a136746621287222de733dbf0cd4b8a5","_id":"stylelint-webpack-plugin@2.1.0","_nodeVersion":"12.18.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-nx6pF+s4kWuXj2pAhPiMjAsRZqsPphamy2rwUuPiKmb1FRYtXZL0jl+iwoqc/W3hMaia+UMiGJBzkjXKLXmSmA==","shasum":"ea4727d83a6d5e3c8784f2bb147bbd9de8e88ec3","tarball":"http://registry-npm.ywwl.com/stylelint-webpack-plugin/download/stylelint-webpack-plugin-2.1.0.tgz","fileCount":19,"unpackedSize":33185,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6lQDCRA9TVsSAnZWagAAZ5IP/RG22ohyGFa1jCS5468o\nuJLlYsSY1g4VSuoo6CyYbFlZS/yN4Ok5bO8KcYphL23goRqU2rSqQSjSyqiH\niv426muqzKFQznSjEOZ1DVSemOfKKDObnpx7mvEuuYzPw63t13rZi8s4dGWa\n+/AlIwNmxyTAMdgXkmRVzBLChA0zeb1KcBKQl73coNyFMVnKOhLP/DJu0MVF\nJHjYWsVdALiGckJsukDq2UrxgUaXofCVZnrt2VSFFo7nDHHfUQaKCYLQ74tX\nGnj9EWV44t9edL8slDV5ZhPTOu6NAsh/PAeRhgSmnIqqwRWlASj8THcZvM91\nVGM2hp3/oHLv/pPY8L2dDXIcr2NzZixZYmvIM4t2UEH1dpeSFaNhdY5OoRV1\nigWGre0Cztt7AUimWY8hfQPQOvETgCjh5G1zxWTQSLt6RRbi7mvK1v8/u0Wx\nMgakJoCiR4pY/PcZe8RCXD8LLcgpDWH//oMqzFO+j30ItyxFr1qQ4SsbFUZr\nibkU0/GKhaaY/XaQDSnr654+Z1LGgh7KMhmuQSIlghriCbiPoHcC+AU71ET7\nVDQpZpzXmu/+JSmcx6okqsVIeSLngLwMdaayRD3q4v9SNXmxFrY/h2NPkLH1\nKQaWIWiyWyOOEYykWUiJyYOwxQurDl3M9Cfixc9o5fXYc2tb9VeT7ePZ6v5m\nStJ3\r\n=eA9Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD0CjOYRp86i+dG10tM59musTDiH6RKmUItN7nckCMvcAIhAIz+1jZ6WUXmPW6kzKkEM6ZchObW7yl/Y0Y+3/cP85i/"}],"size":8680,"noattachment":false,"key":"/stylelint-webpack-plugin/-/stylelint-webpack-plugin-2.1.0.tgz"},"maintainers":[{"email":"wiens.joshua@gmail.com","name":"d3viant0ne"},{"email":"jgkurian@me.com","name":"jakxz"},{"email":"andrew@shellscape.org","name":"shellscape"},{"email":"javiersanchezmarin@gmail.com","name":"vieron"}],"_npmUser":{"name":"ricardogobbosouza","email":"ricardogobbosouza@yahoo.com.br"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stylelint-webpack-plugin_2.1.0_1592415234714_0.20047698391759683"},"_hasShrinkwrap":false,"readme":"<div align=\"center\">\n  <a href=\"https://github.com/stylelint/stylelint\"><img width=\"200\" height=\"200\" src=\"https://cdn.worldvectorlogo.com/logos/stylelint.svg\"></a>\n  <a href=\"https://github.com/webpack/webpack\"><img width=\"200\" height=\"200\" src=\"https://webpack.js.org/assets/icon-square-big.svg\"></a>\n</div>\n\n[![npm][npm]][npm-url]\n[![node][node]][node-url]\n[![tests][tests]][tests-url]\n[![coverage][cover]][cover-url]\n[![discussion][discussion]][discussion-url]\n[![size][size]][size-url]\n\n# stylelint-webpack-plugin\n\n> This version of stylelint-webpack-plugin only works with webpack 5. For the webpack 4, see the [2.x branch](https://github.com/webpack-contrib/stylelint-webpack-plugin/tree/2.x).\n\nThis plugin uses [`stylelint`](https://stylelint.io/) that helps you avoid errors and enforce conventions in your styles.\n\n## Getting Started\n\nTo begin, you'll need to install `stylelint-webpack-plugin`:\n\n```console\nnpm install stylelint-webpack-plugin --save-dev\n```\n\nor\n\n```console\nyarn add -D stylelint-webpack-plugin\n```\n\nor\n\n```console\npnpm add -D stylelint-webpack-plugin\n```\n\n> **Note**:\n>\n> You also need to install `stylelint >= 13` from npm, if you haven't already:\n\n```console\nnpm install stylelint --save-dev\n```\n\nor\n\n```console\nyarn add -D stylelint\n```\n\nor\n\n```console\npnpm add -D stylelint\n```\n\n> **Note**:\n>\n> If you are using Stylelint 13 rather than 14+, you might also need to install `@types/stylelint` as a dev dependency if getting stylelint related type errors.\n\nThen add the plugin to your webpack config. For example:\n\n```js\nconst StylelintPlugin = require('stylelint-webpack-plugin');\n\nmodule.exports = {\n  // ...\n  plugins: [new StylelintPlugin(options)],\n  // ...\n};\n```\n\n## Options\n\nSee [stylelint's options](https://stylelint.io/user-guide/usage/node-api#options) for the complete list of options available. These options are passed through to the `stylelint` directly.\n\n### `cache`\n\n- Type:\n\n```ts\ntype cache = boolean;\n```\n\n- Default: `true`\n\nThe cache is enabled by default to decrease execution time.\n\n### `cacheLocation`\n\n- Type:\n\n```ts\ntype cacheLocation = string;\n```\n\n- Default: `node_modules/.cache/stylelint-webpack-plugin/.stylelintcache`\n\nSpecify the path to the cache location. Can be a file or a directory.\n\n### `configFile`\n\n- Type:\n\n```ts\ntype context = string;\n```\n\n- Default: `undefined`\n\nSpecify the config file location to be used by `stylelint`.\n\n> **Note:**\n>\n> By default this is [handled by `stylelint`](https://stylelint.io/user-guide/configure).\n\n### `context`\n\n- Type:\n\n```ts\ntype context = string;\n```\n\n- Default: `compiler.context`\n\nA string indicating the root of your files.\n\n### `exclude`\n\n- Type:\n\n```ts\ntype exclude = string | Array<string>;\n```\n\n- Default: `['node_modules', compiler.options.output.path]`\n\nSpecify the files and/or directories to exclude. Must be relative to `options.context`.\n\n### `extensions`\n\n- Type:\n\n```ts\ntype extensions = string | Array<string>;\n```\n\n- Default: `['css', 'scss', 'sass']`\n\nSpecify extensions that should be checked.\n\n### `files`\n\n- Type:\n\n```ts\ntype files = string | Array<string>;\n```\n\n- Default: `null`\n\nSpecify directories, files, or globs. Must be relative to `options.context`. Directories are traversed recursively looking for files matching `options.extensions`. File and glob patterns ignore `options.extensions`.\n\n### `fix`\n\n- Type:\n\n```ts\ntype fix = boolean;\n```\n\n- Default: `false`\n\nIf `true`, `stylelint` will fix as many errors as possible. The fixes are made to the actual source files. All unfixed errors will be reported. See [Autofixing errors](https://stylelint.io/user-guide/usage/options#fix) docs.\n\n### `formatter`\n\n- Type:\n\n```ts\ntype formatter = string | (\n  results: Array<import('stylelint').LintResult>\n) => string\n```\n\n- Default: `'string'`\n\nSpecify the formatter that you would like to use to format your results. See [formatter option](https://stylelint.io/user-guide/usage/options#formatter).\n\n### `lintDirtyModulesOnly`\n\n- Type:\n\n```ts\ntype lintDirtyModulesOnly = boolean;\n```\n\n- Default: `false`\n\nLint only changed files, skip lint on start.\n\n### `stylelintPath`\n\n- Type:\n\n```ts\ntype stylelintPath = string;\n```\n\n- Default: `stylelint`\n\nPath to `stylelint` instance that will be used for linting.\n\n### `threads`\n\n- Type:\n\n```ts\ntype threads = boolean | number;\n```\n\n- Default: `false`\n\nSet to true for an auto-selected pool size based on number of cpus. Set to a number greater than 1 to set an explicit pool size. Set to false, 1, or less to disable and only run in main process.\n\n### Errors and Warning\n\n**By default the plugin will auto adjust error reporting depending on stylelint errors/warnings counts.**\nYou can still force this behavior by using `emitError` **or** `emitWarning` options:\n\n#### `emitError`\n\n- Type:\n\n```ts\ntype emitError = boolean;\n```\n\n- Default: `true`\n\nThe errors found will always be emitted, to disable set to `false`.\n\n#### `emitWarning`\n\n- Type:\n\n```ts\ntype emitWarning = boolean;\n```\n\n- Default: `true`\n\nThe warnings found will always be emitted, to disable set to `false`.\n\n#### `failOnError`\n\n- Type:\n\n```ts\ntype failOnError = boolean;\n```\n\n- Default: `true`\n\nWill cause the module build to fail if there are any errors, to disable set to `false`.\n\n#### `failOnWarning`\n\n- Type:\n\n```ts\ntype failOnWarning = boolean;\n```\n\n- Default: `false`\n\nWill cause the module build to fail if there are any warnings, if set to `true`.\n\n#### `quiet`\n\n- Type:\n\n```ts\ntype quiet = boolean;\n```\n\n- Default: `false`\n\nWill process and report errors only and ignore warnings, if set to `true`.\n\n#### `outputReport`\n\n- Type:\n\n```ts\ntype outputReport =\n  | boolean\n  | {\n      filePath?: string | undefined;\n      formatter?:\n        | (\n            | string\n            | ((results: Array<import('stylelint').LintResult>) => string)\n          )\n        | undefined;\n    };\n```\n\n- Default: `false`\n\nWrite the output of the errors to a file, for example a `json` file for use for reporting.\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\n{\n  filePath: 'path/to/file';\n  formatter: 'json';\n}\n```\n\n## Changelog\n\n[Changelog](CHANGELOG.md)\n\n## License\n\n[MIT](./LICENSE)\n\n[npm]: https://img.shields.io/npm/v/stylelint-webpack-plugin.svg\n[npm-url]: https://npmjs.com/package/stylelint-webpack-plugin\n[node]: https://img.shields.io/node/v/stylelint-webpack-plugin.svg\n[node-url]: https://nodejs.org\n[tests]: https://github.com/webpack-contrib/stylelint-webpack-plugin/workflows/stylelint-webpack-plugin/badge.svg\n[tests-url]: https://github.com/webpack-contrib/stylelint-webpack-plugin/actions\n[cover]: https://codecov.io/gh/webpack-contrib/stylelint-webpack-plugin/branch/master/graph/badge.svg\n[cover-url]: https://codecov.io/gh/webpack-contrib/stylelint-webpack-plugin\n[discussion]: https://img.shields.io/github/discussions/webpack/webpack\n[discussion-url]: https://github.com/webpack/webpack/discussions\n[size]: https://packagephobia.now.sh/badge?p=stylelint-webpack-plugin\n[size-url]: https://packagephobia.now.sh/result?p=stylelint-webpack-plugin\n","publish_time":1592415234852,"_cnpm_publish_time":1592415234852,"dist-tags":{"2x":"2.5.0","latest":"5.1.0"}}