{"_id":"@adp-psych/stylelint-media-use-custom-media","_rev":"1-fbf7d721373501e50f43ad21a43eaebc","name":"@adp-psych/stylelint-media-use-custom-media","dist-tags":{"latest":"2.0.1-1"},"versions":{"2.0.1-1":{"name":"@adp-psych/stylelint-media-use-custom-media","version":"2.0.1-1","description":"Enforce usage of custom media queries in CSS","author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"license":"CC0-1.0","repository":{"type":"git","url":"git+https://github.com/csstools/stylelint-media-use-custom-media.git"},"homepage":"https://github.com/csstools/stylelint-media-use-custom-media#readme","bugs":{"url":"https://github.com/csstools/stylelint-media-use-custom-media/issues"},"main":"index.js","module":"index.mjs","scripts":{"prepublishOnly":"npm test","pretest":"rollup -c .rollup.js --silent","test":"npm run test:js && npm run test:tape","test:js":"eslint src/*.js src/lib/*.js --cache --ignore-path .gitignore --quiet","test:tape":"tape ./.tape.js | tap-spec"},"engines":{"node":">=14"},"dependencies":{},"devDependencies":{"@babel/core":"^7.17.5","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.16.11","babel-eslint":"^10.1.0","eslint":"^7.16.0","eslint-config-dev":"^2.0.0","pre-commit":"^1.2.2","rollup":"^2.70.0","rollup-plugin-babel":"^4.4.0","stylelint":"^14.5.3","stylelint-test-rule-tape":"^0.2.0","tap-spec":"^5.0.0"},"peerDependencies":{"stylelint":"^14.5.3"},"eslintConfig":{"extends":"dev","parser":"babel-eslint"},"keywords":["stylelint","stylelint-plugin","css","use","custom","media","custom-media","queries","query","variables","variable","vars","var"],"publishConfig":{"access":"public"},"gitHead":"e0f6f0e267cfa40ac36ad707bba2199ad345e704","_id":"@adp-psych/stylelint-media-use-custom-media@2.0.1-1","_nodeVersion":"17.7.2","_npmVersion":"8.5.5","dist":{"integrity":"sha512-CG1BJxkvff3OCtlyQedPI0rgR+YLgpGvy8YDX4r/4U2dgrYgL2rfnzDbxBCu6iFq70KOIRx867Ze2mGLHvUH5Q==","shasum":"4e3a78ae51a2bebbaa38bf75a0364a9b6472362b","tarball":"https://registry.npmjs.org/@adp-psych/stylelint-media-use-custom-media/-/stylelint-media-use-custom-media-2.0.1-1.tgz","fileCount":7,"unpackedSize":85710,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiODdHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqtsRAAnUY+33NzdyOdVo+Fm2ZGjzzug+gCciZ5zkx9/VdQq/+E9tmV\r\njUp3Ou6gY6Acg8yhaV84XswSu69PD+oOc8QWQjfXO7SA9BtYeMD/gTy7hoRM\r\nQ8ATEqtSxTjAQUoiBwEcJYHZrFqzrGkY7wTZPzWLbkF2/8b/ELRpHxKiBkf6\r\nfEize3cXqzpUYkuCtMW9T/QeIu/ZV9tRWpcHWWaZowjnJSs/bE4Rn42c9ukK\r\nLFUkr1NDx1aMUUVRx3K23jVY2IYfoF5IGKG5gBHIx9XV0FHrefrLv3UcmyaP\r\nM7eLns75XT0cHhKhR/fGK4+L46Sa25Z84XcUpgv1StBdAvTi3CEQKLZPlPY/\r\ndErgViyRNYrdLbDnf6S/JLTAIubOTRJxpNQ/T06RDeRzZICi+W2jDY60o/2W\r\n95ABCi4eFFdXKQPzrozh70hRmtG3rnlqD05uGdSj9Lnt4Weqmu3HrZC/wbXf\r\nArFpFAoYlE45DKIsIoCh86s2aOlOnJUEkgVQpkLuYDs3O8Y5KFQd0OsnL9S+\r\n/NQLgUZT21+99Nn+V2o9btgzu+RNVZCWu7w8liApV5lyZYzt4gXsvCZ+V2Pt\r\nOAGOWzqCrL7Z+xj1pRurUdfkKDKv3HCAucIiBv3CEZPcdC+i5ndE1gN7YSJ2\r\n5t4tuXo1BOlxY/2DmGGcQBjBHot0qAXdnVY=\r\n=1aGw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBJLrwFSWvlMnj4YH2vpova+hsf36/k9BdOTldSLd0OyAiAIOAXKtA5Vadxa2VF2MRJiteQq78zGfKT7NRZK72V0zw=="}]},"_npmUser":{"name":"adp-psych","email":"anthony.dipietro@research.uwa.edu.au"},"directories":{},"maintainers":[{"name":"adp-psych","email":"anthony.dipietro@research.uwa.edu.au"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stylelint-media-use-custom-media_2.0.1-1_1647851335335_0.7602400414125305"},"_hasShrinkwrap":false}},"time":{"created":"2022-03-21T08:28:55.244Z","2.0.1-1":"2022-03-21T08:28:55.467Z","modified":"2022-04-04T11:36:37.771Z"},"maintainers":[{"name":"adp-psych","email":"anthony.dipietro@research.uwa.edu.au"}],"description":"Enforce usage of custom media queries in CSS","homepage":"https://github.com/csstools/stylelint-media-use-custom-media#readme","keywords":["stylelint","stylelint-plugin","css","use","custom","media","custom-media","queries","query","variables","variable","vars","var"],"repository":{"type":"git","url":"git+https://github.com/csstools/stylelint-media-use-custom-media.git"},"author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"bugs":{"url":"https://github.com/csstools/stylelint-media-use-custom-media/issues"},"license":"CC0-1.0","readme":"# Media Use Custom Media [<img src=\"https://jonathantneal.github.io/stylelint-logo.svg\" alt=\"stylelint\" width=\"90\" height=\"90\" align=\"right\">][stylelint]\n\n[![NPM Version][npm-img]][npm-url]\n[![Build Status][cli-img]][cli-url]\n[![Support Chat][git-img]][git-url]\n\n[Media Use Custom Media] is a [stylelint] rule to enforce usage of custom media\nqueries in CSS.\n\n## Usage\n\nAdd [stylelint] and [Media Use Custom Media] to your project.\n\n```bash\nnpm install stylelint stylelint-media-use-custom-media --save-dev\n```\n\nAdd [Media Use Custom Media] to your [stylelint configuration].\n\n```js\n{\n  \"plugins\": [\n    \"stylelint-media-use-custom-media\"\n  ],\n  \"rules\": {\n    \"csstools/media-use-custom-media\": \"always\" || \"always-known\" || \"known\" || \"never\" || \"ignore\"\n  }\n}\n```\n\n## Options\n\n### always\n\nIf the first option is `\"always\"` or `true`, then [Media Use Custom Media]\nrequires all `@media` queries to use Custom Media, and the following patterns\nare _not_ considered violations:\n\n```pcss\n@media (--sm) {}\n\n@media (--sm), (--md) {}\n\n@media screen and (--sm) {}\n```\n\nWhile the following patterns are considered violations:\n\n```pcss\n@media (max-width: 40rem) {}\n\n@media (max-width: 40rem), (--md) {}\n```\n\n### never\n\nIf the first option is `\"never\"` or `false`, then [Media Use Custom Media]\nrequires all `@media` queries to not use Custom Media, and the following\npatterns are _not_ considered violations:\n\n```pcss\n@media (max-width: 40rem) {}\n\n@media screen and (max-width: 40rem) {}\n```\n\nWhile the following patterns are considered violations:\n\n```pcss\n@media (--md) {}\n\n@media screen and (--md) {}\n\n@media (--md), (max-width: 40rem) {}\n```\n\n### known\n\nIf the first option is `\"known\"`, then [Media Use Custom Media] requires all\n`@media` queries referencing Custom Media to be known from either\n`@custom-media` declarations in the file or imported using the second\noption. Then the following patterns are _not_ considered violations:\n\n```pcss\n@custom-media --sm (min-width: 40rem);\n\n@media (--sm) {}\n\n@media (--sm), (min-width: 40rem) {}\n```\n\nWhile the following patterns are considered violations:\n\n```pcss\n@media (--md) {}\n\n@media (--md), (min-width: 40rem) {}\n```\n\n### always-known\n\nIf the first option is `\"known\"`, then [Media Use Custom Media] requires all\n`@media` queries to use known Custom Media from either `@custom-media`\ndeclarations in the file or imported using the second option. Then the\nfollowing patterns are _not_ considered violations:\n\n```pcss\n@custom-media --sm (min-width: 40rem);\n\n@media (--sm) {}\n```\n\nWhile the following patterns are considered violations:\n\n```pcss\n@custom-media --sm (min-width: 40rem);\n\n@media (--sm), (min-width: 40rem) {}\n\n@media (--md) {}\n```\n\n### ignore\n\nIf the first option is `\"ignore\"` or `null`, then [Media Use Custom Media] does\nnothing.\n\n---\n\n### importFrom\n\nWhen the first option is `\"always-known\"` or `\"known\"`, then the second option\ncan specify sources where Custom Properties should be imported from by using an\n`importFrom` key. These imports might be CSS, JS, and JSON files, functions,\nand directly passed objects.\n\n```js\n// .stylelintrc\n{\n  \"plugins\": [\n    \"stylelint-media-use-custom-media\"\n  ],\n  \"rules\": {\n    \"csstools/media-use-custom-media\": [\"known\", {\n      \"importFrom\": [\n        \"path/to/file.css\", // => @custom-media --sm (min-width: 40rem);\n        \"path/to/file.json\" // => { \"custom-media\": { \"--sm\": \"(min-width: 40rem)\" } }\n      ]\n    }\n  }\n}\n```\n\n[cli-img]: https://img.shields.io/travis/csstools/stylelint-media-use-custom-media.svg\n[cli-url]: https://travis-ci.org/csstools/stylelint-media-use-custom-media\n[git-img]: https://img.shields.io/badge/support-chat-blue.svg\n[git-url]: https://gitter.im/stylelint/stylelint\n[npm-img]: https://img.shields.io/npm/v/stylelint-media-use-custom-media.svg\n[npm-url]: https://www.npmjs.com/package/stylelint-media-use-custom-media\n\n[stylelint]: https://github.com/stylelint/stylelint\n[stylelint configuration]: https://github.com/stylelint/stylelint/blob/master/docs/user-guide/configuration.md#readme\n[Media Use Custom Media]: https://github.com/csstools/stylelint-media-use-custom-media\n","readmeFilename":"README.md"}