{"_id":"@adp-psych/stylelint-use-nesting","_rev":"1-f79dfb56d933eee4897e7ee995d6aee9","name":"@adp-psych/stylelint-use-nesting","dist-tags":{"latest":"3.0.1-1"},"versions":{"3.0.1-1":{"name":"@adp-psych/stylelint-use-nesting","version":"3.0.1-1","description":"Enforce nesting when it is possible in CSS","author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"license":"CC0-1.0","repository":{"type":"git","url":"git+https://github.com/csstools/stylelint-use-nesting.git"},"homepage":"https://github.com/csstools/stylelint-use-nesting#readme","bugs":{"url":"https://github.com/csstools/stylelint-use-nesting/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 --cache --ignore-path .gitignore --quiet","test:tape":"stylelint-tape"},"engines":{"node":">=14"},"dependencies":{},"devDependencies":{"@babel/core":"^7.17.5","@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-tape":"^2.0.0"},"peerDependencies":{"stylelint":"^14.5.3"},"eslintConfig":{"extends":"dev","parser":"babel-eslint"},"keywords":["stylelint","stylelint-plugin","css","prefer","nesting"],"publishConfig":{"access":"public"},"gitHead":"9671be70fb575e62fa3b6587add6d3c64b06f79b","_id":"@adp-psych/stylelint-use-nesting@3.0.1-1","_nodeVersion":"17.7.2","_npmVersion":"8.5.5","dist":{"integrity":"sha512-bPowVE3hBcgy6+ToFgRSZWIZVDxyt+sgjyCHPTReL8Ei/SqUXy23nc3gJJSWqZIGRo/k01KBZtY4stfwJcVrVg==","shasum":"d4a020c1c7e91028c31a46c6b1fa1f5cdb827848","tarball":"https://registry.npmjs.org/@adp-psych/stylelint-use-nesting/-/stylelint-use-nesting-3.0.1-1.tgz","fileCount":7,"unpackedSize":65432,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOEATACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqnyg/+Khwqg9xmKnxvJVi73hS3feEvtNMdxHqWcz5GIZMCwwKxXSyr\r\n6nyJFfPUlpg7CEKFi2zItCGgSpzIGZ8UjljJTMZCPSICZEfsleSj+nLOocQO\r\nGpYiDatf90dAHT8DxqyRnwVaDfmQLUmAyJp2M65HTwyUFa/O+RKYqlWk5M/X\r\nuUTLLE1mdqWr8mFV9CDuenSTQay9EfzIxQiezLAKbkH0kdjT+fjm9vkVKbj+\r\nIt4L8Lxr0X1O8nHU5DjJXt/fQ5skeUVG/ynilR1yicb30KCKQGMNDUao/Rnb\r\nKc8Scre5y53Wh5kAs6UkQWmogXB7IkWVs300GFvbhOt7Wen68pvMzY4IodL8\r\nV096MEG+EpmVj1atnBffWx9d0t9w1dvYwKGH/wDdsfk8DehxuJoKzJ+UblSx\r\ntXnehjyJh/Hf0MhkH+Qg5g3VVJueLROGi47YN1xH8V+IsJFiHWjBJ/wA29tu\r\ney5yJdjH5QiBHVPcNXvmMS/2cGJgKJTnxUfuWu0CV6ikrGki2krXxX6zigck\r\n5SR+px8ZS7qhMEJ9TLd653e/TPbQe2NBtp2yoW9T9sBsR760PXNfRFMJxf68\r\nkhOjsdaVUTTM13sAdt1M39tpScU+jqI7y6shPSvybEaoaDDtlq8Yams2aRs6\r\nlW0qky3k0E6XHURNczQpBcZ+T+OwU6LQ4h8=\r\n=E+gD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9+Bc0U6bvxaGfndCc8IN4nyUPxoOGEzVDNBob2hJtgwIgLmPr7vij+7bvzAi9tirZfmJiBKjXkq7uJUtNPjBnMBs="}]},"_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-use-nesting_3.0.1-1_1647853587214_0.8728106495178249"},"_hasShrinkwrap":false}},"time":{"created":"2022-03-21T09:06:27.155Z","3.0.1-1":"2022-03-21T09:06:27.382Z","modified":"2022-04-04T11:36:38.272Z"},"maintainers":[{"name":"adp-psych","email":"anthony.dipietro@research.uwa.edu.au"}],"description":"Enforce nesting when it is possible in CSS","homepage":"https://github.com/csstools/stylelint-use-nesting#readme","keywords":["stylelint","stylelint-plugin","css","prefer","nesting"],"repository":{"type":"git","url":"git+https://github.com/csstools/stylelint-use-nesting.git"},"author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"bugs":{"url":"https://github.com/csstools/stylelint-use-nesting/issues"},"license":"CC0-1.0","readme":"# Stylelint Use Nesting [<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[Stylelint Use Nesting] is a [stylelint] rule to enforce nesting when it is\npossible in CSS.\n\n## Usage\n\nAdd [stylelint] and [Stylelint Use Nesting] to your project.\n\n```bash\nnpm install stylelint stylelint-use-nesting --save-dev\n```\n\nAdd [Stylelint Use Nesting] to your [stylelint configuration].\n\n```js\n{\n  \"plugins\": [\n    \"stylelint-use-nesting\"\n  ],\n  \"rules\": {\n    \"csstools/use-nesting\": \"always\" || \"ignore\"\n  }\n}\n```\n\n## Options\n\n### always\n\nIf the first option is `\"always\"` or `true`, then [Stylelint Use Nesting]\nrequires all nodes to be linted, and the following patterns are _not_\nconsidered violations:\n\n```pcss\n.example {\n  color: blue;\n\n  &:hover {\n    color: rebeccapurple;\n  }\n}\n```\n\n```pcss\n.example {\n  color: blue;\n\n  @media (min-width: 640px) {\n    color: rebeccapurple;\n  }\n}\n```\n\nWhile the following patterns are considered violations:\n\n```pcss\n.example {\n  color: blue;\n}\n\n.example:hover {\n  color: rebeccapurple;\n}\n```\n\n```pcss\n.example {\n  color: blue;\n}\n\n@media (min-width: 640px) {\n  .example {\n    color: rebeccapurple;\n  }\n}\n```\n\n### ignore\n\nIf the first option is `\"ignore\"` or `null`, then [Stylelint Use Nesting] does\nnothing.\n\n## Secondary Options\n\n### except\n\nThe `except` option ignores reporting or autofixing rules where the potentially\nnesting portion of the selector matches a case-insensitive string or regular\nexpression.\n\n```js\n{\n  \"rules\": {\n    \"csstools/use-nesting\": [\"always\", { \"except\": [':selection', /^:dir/i] }]\n  }\n}\n```\n\n### only\n\nThe `except` option limits reporting and autofixing to rules where the\npotentially nesting portion of the selector matches a case-insensitive string\nor regular expression.\n\n```js\n{\n  \"rules\": {\n    \"csstools/use-nesting\": [\"always\", { \"only\": ['.js', /^:(hover|focus)/i] }]\n  }\n}\n```\n\n[cli-img]: https://img.shields.io/travis/csstools/stylelint-use-nesting/master.svg\n[cli-url]: https://travis-ci.org/csstools/stylelint-use-nesting\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-use-nesting.svg\n[npm-url]: https://www.npmjs.com/package/stylelint-use-nesting\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[Stylelint Use Nesting]: https://github.com/csstools/stylelint-use-nesting\n","readmeFilename":"README.md"}