{"id":22293545,"url":"https://github.com/xi/stylelint-selector-pattern","last_synced_at":"2025-03-25T22:18:11.970Z","repository":{"id":57373703,"uuid":"82275838","full_name":"xi/stylelint-selector-pattern","owner":"xi","description":"A stylelint plugin that allows to check selectors with regular expressions.","archived":false,"fork":false,"pushed_at":"2017-07-12T21:37:12.000Z","size":7,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-06T01:16:05.635Z","etag":null,"topics":["stylelint"],"latest_commit_sha":null,"homepage":"","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/xi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-17T08:39:31.000Z","updated_at":"2019-12-17T23:35:11.000Z","dependencies_parsed_at":"2022-09-18T14:30:48.642Z","dependency_job_id":null,"html_url":"https://github.com/xi/stylelint-selector-pattern","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xi%2Fstylelint-selector-pattern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xi%2Fstylelint-selector-pattern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xi%2Fstylelint-selector-pattern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xi%2Fstylelint-selector-pattern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xi","download_url":"https://codeload.github.com/xi/stylelint-selector-pattern/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245550681,"owners_count":20633883,"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":["stylelint"],"created_at":"2024-12-03T17:29:33.757Z","updated_at":"2025-03-25T22:18:11.944Z","avatar_url":"https://github.com/xi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stylelint-selector-pattern\n\nA [stylelint](https://github.com/stylelint/stylelint) plugin that allows to\ncheck selectors with regular expressions.\n\n## Installation\n\n    npm install stylelint-selector-pattern\n\n## Simple Usage\n\nAdd it to the `plugin` section in your stylelint config and specify a regular\nexpression in the rules section:\n\n    // .stylelintrc\n    {\n      \"plugins\": [\n        \"stylelint-selector-pattern\"\n      ],\n      \"rules\": {\n        // ...\n        \"xi/selector-pattern\": \"^\\.[a-z-]+$\",\n        // ...\n      }\n    }\n\nInstead of a pattern, you can also use the name of one of the presets: `bem`,\n`suit`, and `itcss`.\n\n## Options\n\nIn order to not keep the pattern readable, you can use the `subpatterns` option:\n\n    \"xi/selector-pattern\": [\"^{component}({modifier}|{element})?$\", {\n      \"subpatterns\": {\n        \"component\": \"\\.[a-z-]+\",\n        \"modifier\": \"--[a-z-]+\",\n        \"element\": \"__[a-z-]+\"\n      }\n    }]\n\nYou can also filter the selectors that the rule should apply to:\n\n    \"xi/selector-pattern\": [\"^\\.[a-z-]+$\", {\n      \"filter\": \"^\\\\.\"\n    }]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxi%2Fstylelint-selector-pattern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxi%2Fstylelint-selector-pattern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxi%2Fstylelint-selector-pattern/lists"}