{"id":19652998,"url":"https://github.com/csstools/stylelint-use-nesting","last_synced_at":"2025-10-11T20:35:09.788Z","repository":{"id":33510529,"uuid":"159097713","full_name":"csstools/stylelint-use-nesting","owner":"csstools","description":"Enforce nesting when it is possible in CSS","archived":false,"fork":false,"pushed_at":"2024-12-27T18:26:18.000Z","size":98,"stargazers_count":47,"open_issues_count":6,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-10-11T00:24:30.989Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csstools.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-11-26T02:20:59.000Z","updated_at":"2025-08-02T21:59:48.000Z","dependencies_parsed_at":"2024-04-13T21:44:31.033Z","dependency_job_id":"160c20d9-89a7-4229-a3f3-3c47dea2b9dc","html_url":"https://github.com/csstools/stylelint-use-nesting","commit_stats":{"total_commits":20,"total_committers":7,"mean_commits":2.857142857142857,"dds":"0.44999999999999996","last_synced_commit":"46be7d45ea20983077e5f183efa0156d84404b1f"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/csstools/stylelint-use-nesting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fstylelint-use-nesting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fstylelint-use-nesting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fstylelint-use-nesting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fstylelint-use-nesting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csstools","download_url":"https://codeload.github.com/csstools/stylelint-use-nesting/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fstylelint-use-nesting/sbom","scorecard":{"id":311360,"data":{"date":"2025-08-11","repo":{"name":"github.com/csstools/stylelint-use-nesting","commit":"3fcbd48fbf7b96e06840521aaaa829881f4e4df4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Code-Review","score":2,"reason":"Found 6/25 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: Creative Commons Zero v1.0 Universal: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T23:13:49.634Z","repository_id":33510529,"created_at":"2025-08-17T23:13:49.634Z","updated_at":"2025-08-17T23:13:49.634Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279008619,"owners_count":26084480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T15:12:52.577Z","updated_at":"2025-10-11T20:35:09.772Z","avatar_url":"https://github.com/csstools.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stylelint Use Nesting [\u003cimg src=\"https://jonneal.dev/stylelint-logo.svg\" alt=\"stylelint\" width=\"90\" height=\"90\" align=\"right\"\u003e][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```shell\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  \u0026: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### syntax\n\nThe `syntax` option allows you to specify the syntax of the source files being processed. For SCSS syntax set the value to `scss`.\n\n```js\n{\n  \"rules\": {\n    \"csstools/use-nesting\": [\"always\", { \"syntax\": \"scss\" }]\n  }\n}\n```\n\n[cli-img]: https://img.shields.io/travis/csstools/stylelint-use-nesting/main.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/main/docs/user-guide/configuration.md#readme\n[Stylelint Use Nesting]: https://github.com/csstools/stylelint-use-nesting\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fstylelint-use-nesting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsstools%2Fstylelint-use-nesting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fstylelint-use-nesting/lists"}