{"action":"created","issue":{"url":"https://api.github.com/repos/stylelint/stylelint/issues/1951","repository_url":"https://api.github.com/repos/stylelint/stylelint","labels_url":"https://api.github.com/repos/stylelint/stylelint/issues/1951/labels{/name}","comments_url":"https://api.github.com/repos/stylelint/stylelint/issues/1951/comments","events_url":"https://api.github.com/repos/stylelint/stylelint/issues/1951/events","html_url":"https://github.com/stylelint/stylelint/issues/1951","id":180937251,"number":1951,"title":"Provide regex examples of popular selector naming conventions (camelcase, kebabcase etc)","user":{"login":"Awk34","id":5545474,"avatar_url":"https://avatars.githubusercontent.com/u/5545474?v=3","gravatar_id":"","url":"https://api.github.com/users/Awk34","html_url":"https://github.com/Awk34","followers_url":"https://api.github.com/users/Awk34/followers","following_url":"https://api.github.com/users/Awk34/following{/other_user}","gists_url":"https://api.github.com/users/Awk34/gists{/gist_id}","starred_url":"https://api.github.com/users/Awk34/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Awk34/subscriptions","organizations_url":"https://api.github.com/users/Awk34/orgs","repos_url":"https://api.github.com/users/Awk34/repos","events_url":"https://api.github.com/users/Awk34/events{/privacy}","received_events_url":"https://api.github.com/users/Awk34/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/stylelint/stylelint/labels/status:%20discussion","name":"status: discussion","color":"0023ee"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-04T16:09:04Z","updated_at":"2016-10-04T16:43:08Z","closed_at":null,"body":"<!-- Please answer the following questions. Issues that don't use this template will be closed. -->\r\n\r\n> Describe the issue. Is it a bug or a feature request (new rule, new option, etc.)?\r\n\r\nI added the following rule to my `.stylelintrc` to enforce kebab-case selector names: `\"selector-class-pattern\": \"^([a-z][a-z0-9]*)(-[a-z0-9]+)*$\"`. It enforces that a class starts with at least one lowercase letter character + 0 or more lowercase letters/numbers, and is followed by 0 or more dashes + any mix of lowercase letters/numbers. Is this something that could maybe be added to this project? Or at least to a doc file? There are probably a lot of people like me whom want to enforce such class names, but maybe aren't great at RegEx. There could maybe be shorthands for the rule like `kebab-case` or `camelCase`\r\n\r\n> Which rule, if any, is this issue related to?\r\n\r\n`selector-class-pattern`\r\n\r\n> What CSS is needed to reproduce this issue?\r\n\r\nGood\r\n```css\r\n.foo {}\r\n.foo-bar1 {}\r\n.a-10\r\n```\r\nBad\r\n```css\r\n.Foo {}\r\n.foo-bar1- {}\r\n.1f {}\r\n```\r\n\r\n> What stylelint configuration is needed to reproduce this issue?\r\n\r\n(noted above)\r\n\r\n> Which version of stylelint are you using?\r\n\r\n`^6.5.1`\r\n\r\n> How are you running stylelint: CLI, PostCSS plugin, Node API?\r\n\r\nGulp + PostCSS plugin\r\n\r\n> Does your issue relate to non-standard syntax (e.g. SCSS, nesting, etc.)?\r\n\r\nno\r\n\r\n> What did you expect to happen?\r\n\r\nN/A\r\n\r\n> What actually happened (e.g. what warnings or errors you are getting)?\r\n\r\nN/A\r\n\r\n<!--\r\nHere are the best ways to help resolve your issue:\r\n1. Figure out what needs to be done, propose it, and then write the code and submit a PR.\r\n2. If your issue is a bug, consider at least submitting a PR with failing tests.\r\n-->\r\n\r\n<!--\r\nNote: GitHub issues are for stylelint bugs and enhancements, if you're looking for help or support with stylelint then stackoverflow is our preferred question and answer forum - http://stackoverflow.com/questions/tagged/stylelint\r\n-->\r\n"},"comment":{"url":"https://api.github.com/repos/stylelint/stylelint/issues/comments/251443619","html_url":"https://github.com/stylelint/stylelint/issues/1951#issuecomment-251443619","issue_url":"https://api.github.com/repos/stylelint/stylelint/issues/1951","id":251443619,"user":{"login":"evilebottnawi","id":4567934,"avatar_url":"https://avatars.githubusercontent.com/u/4567934?v=3","gravatar_id":"","url":"https://api.github.com/users/evilebottnawi","html_url":"https://github.com/evilebottnawi","followers_url":"https://api.github.com/users/evilebottnawi/followers","following_url":"https://api.github.com/users/evilebottnawi/following{/other_user}","gists_url":"https://api.github.com/users/evilebottnawi/gists{/gist_id}","starred_url":"https://api.github.com/users/evilebottnawi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evilebottnawi/subscriptions","organizations_url":"https://api.github.com/users/evilebottnawi/orgs","repos_url":"https://api.github.com/users/evilebottnawi/repos","events_url":"https://api.github.com/users/evilebottnawi/events{/privacy}","received_events_url":"https://api.github.com/users/evilebottnawi/received_events","type":"User","site_admin":false},"created_at":"2016-10-04T16:43:08Z","updated_at":"2016-10-04T16:43:08Z","body":"@jeddy3 sgtm, i wanted to offer too"}}
{"actor":{"display_login":"evilebottnawi"}}