{"id":13563225,"url":"https://github.com/simonsmith/stylelint-selector-bem-pattern","last_synced_at":"2025-05-16T09:07:08.790Z","repository":{"id":1915976,"uuid":"45320941","full_name":"simonsmith/stylelint-selector-bem-pattern","owner":"simonsmith","description":"Stylelint plugin that incorporates postcss-bem-linter","archived":false,"fork":false,"pushed_at":"2024-04-23T02:54:04.000Z","size":649,"stargazers_count":241,"open_issues_count":3,"forks_count":13,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-05-18T16:46:11.257Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonsmith.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2015-10-31T22:49:00.000Z","updated_at":"2024-06-18T12:38:51.870Z","dependencies_parsed_at":"2023-01-13T11:29:58.169Z","dependency_job_id":"ea3ef5bf-17fe-4d59-9f8b-fe7b0d8cbb3e","html_url":"https://github.com/simonsmith/stylelint-selector-bem-pattern","commit_stats":{"total_commits":55,"total_committers":11,"mean_commits":5.0,"dds":0.5636363636363637,"last_synced_commit":"86121ef396241303920f1ea8a71c5c3b78f84d4c"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonsmith%2Fstylelint-selector-bem-pattern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonsmith%2Fstylelint-selector-bem-pattern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonsmith%2Fstylelint-selector-bem-pattern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonsmith%2Fstylelint-selector-bem-pattern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonsmith","download_url":"https://codeload.github.com/simonsmith/stylelint-selector-bem-pattern/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254501558,"owners_count":22081528,"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","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-08-01T13:01:16.605Z","updated_at":"2025-05-16T09:07:03.763Z","avatar_url":"https://github.com/simonsmith.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# stylelint-selector-bem-pattern\n\n[![NPM version](http://img.shields.io/npm/v/stylelint-selector-bem-pattern.svg)](https://www.npmjs.com/package/stylelint-selector-bem-pattern) [![Build Status](https://github.com/simonsmith/stylelint-selector-bem-pattern/actions/workflows/ci.yml/badge.svg)](https://github.com/simonsmith/stylelint-selector-bem-pattern/actions/workflows/ci.yml)\n\nA [stylelint](https://github.com/stylelint/stylelint) plugin that incorporates [postcss-bem-linter](https://github.com/postcss/postcss-bem-linter).\n\nTo learn more about postcss-bem-linter, please read [that module's documentation](https://github.com/postcss/postcss-bem-linter).\n\n## Installation\n\n```\nnpm install stylelint-selector-bem-pattern\n```\n\n## Usage\n\nAdd it to your stylelint config `plugins` array, then add `\"plugin/selector-bem-pattern\"` to your rules,\nspecifying your postcss-bem-linter settings as the primary option.\n\nEven though postcss-bem-linter has the default setting of `{ preset: 'suit' }`, this plugin has\nno default setting: if you want to use the SUIT preset, you must pass `{ preset: 'suit' }`,\nand the rule will not work if you do not pass a primary option object.\n\nLike so:\n\n```js\n// .stylelintrc\n{\n  \"plugins\": [\n    \"stylelint-selector-bem-pattern\"\n  ],\n  \"rules\": {\n    // ...\n    \"plugin/selector-bem-pattern\": {\n      \"componentName\": \"[A-Z]+\",\n      \"componentSelectors\": {\n        \"initial\": \"^\\\\.{componentName}(?:-[a-z]+)?$\",\n        \"combined\": \"^\\\\.combined-{componentName}-[a-z]+$\"\n      },\n      \"utilitySelectors\": \"^\\\\.util-[a-z]+$\"\n    },\n    // ...\n  }\n}\n```\n\nFor more examples of postcss-bem-linter configuration possibilities,\nplease read [that module's documentation](https://github.com/postcss/postcss-bem-linter).\nKeep in mind that if your stylelint config is JSON you will have to use strings to\nspecify your selector patterns (as above).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonsmith%2Fstylelint-selector-bem-pattern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonsmith%2Fstylelint-selector-bem-pattern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonsmith%2Fstylelint-selector-bem-pattern/lists"}