{"action":"created","issue":{"url":"https://api.github.com/repos/olegskl/gulp-stylelint/issues/18","repository_url":"https://api.github.com/repos/olegskl/gulp-stylelint","labels_url":"https://api.github.com/repos/olegskl/gulp-stylelint/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/olegskl/gulp-stylelint/issues/18/comments","events_url":"https://api.github.com/repos/olegskl/gulp-stylelint/issues/18/events","html_url":"https://github.com/olegskl/gulp-stylelint/issues/18","id":149867138,"number":18,"title":"Some rules in .stylelintrc produces Undefined rule Error code 78","user":{"login":"cjduncana","id":1977082,"avatar_url":"https://avatars.githubusercontent.com/u/1977082?v=3","gravatar_id":"","url":"https://api.github.com/users/cjduncana","html_url":"https://github.com/cjduncana","followers_url":"https://api.github.com/users/cjduncana/followers","following_url":"https://api.github.com/users/cjduncana/following{/other_user}","gists_url":"https://api.github.com/users/cjduncana/gists{/gist_id}","starred_url":"https://api.github.com/users/cjduncana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjduncana/subscriptions","organizations_url":"https://api.github.com/users/cjduncana/orgs","repos_url":"https://api.github.com/users/cjduncana/repos","events_url":"https://api.github.com/users/cjduncana/events{/privacy}","received_events_url":"https://api.github.com/users/cjduncana/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-04-20T19:45:51Z","updated_at":"2016-07-13T19:49:55Z","closed_at":"2016-04-20T20:14:57Z","body":"# TL;DR\r\n\r\nWhy does the rules `at-rule-name-case`, `function-name-case`, `property-case`, `selector-pseudo-element-case`, `selector-pseudo-class-case`, and `unit-case` produces an error?\r\n\r\n# Problem\r\n\r\nI have the following .styleintrc in the root of my project:\r\n\r\n``` json\r\n{\r\n  \"rules\": {\r\n    \"at-rule-empty-line-before\": [ \"always\", {\r\n      \"except\": [ \"blockless-group\", \"first-nested\" ],\r\n      \"ignore\": [\"after-comment\"],\r\n    } ],\r\n    \"at-rule-name-case\": \"lower\",\r\n    \"at-rule-semicolon-newline-after\": \"always\",\r\n    \"block-closing-brace-newline-after\": \"always\",\r\n    \"block-closing-brace-newline-before\": \"always-multi-line\",\r\n    \"block-closing-brace-space-before\": \"always-single-line\",\r\n    \"block-no-empty\": true,\r\n    \"block-opening-brace-newline-after\": \"always-multi-line\",\r\n    \"block-opening-brace-space-after\": \"always-single-line\",\r\n    \"block-opening-brace-space-before\": \"always\",\r\n    \"color-hex-case\": \"lower\",\r\n    \"color-hex-length\": \"short\",\r\n    \"color-no-invalid-hex\": true,\r\n    \"comment-empty-line-before\": [ \"always\", {\r\n      \"except\": [\"first-nested\"],\r\n      \"ignore\": [\"stylelint-commands\"],\r\n    } ],\r\n    \"comment-whitespace-inside\": \"always\",\r\n    \"declaration-bang-space-after\": \"never\",\r\n    \"declaration-bang-space-before\": \"always\",\r\n    \"declaration-block-no-ignored-properties\": true,\r\n    \"declaration-block-no-shorthand-property-overrides\": true,\r\n    \"declaration-block-semicolon-newline-after\": \"always-multi-line\",\r\n    \"declaration-block-semicolon-space-after\": \"always-single-line\",\r\n    \"declaration-block-semicolon-space-before\": \"never\",\r\n    \"declaration-block-single-line-max-declarations\": 1,\r\n    \"declaration-block-trailing-semicolon\": \"always\",\r\n    \"declaration-colon-newline-after\": \"always-multi-line\",\r\n    \"declaration-colon-space-after\": \"always-single-line\",\r\n    \"declaration-colon-space-before\": \"never\",\r\n    \"function-calc-no-unspaced-operator\": true,\r\n    \"function-comma-newline-after\": \"always-multi-line\",\r\n    \"function-comma-space-after\": \"always-single-line\",\r\n    \"function-comma-space-before\": \"never\",\r\n    \"function-linear-gradient-no-nonstandard-direction\": true,\r\n    \"function-name-case\": \"lower\",\r\n    \"function-parentheses-newline-inside\": \"always-multi-line\",\r\n    \"function-parentheses-space-inside\": \"never-single-line\",\r\n    \"function-whitespace-after\": \"always\",\r\n    \"indentation\": 4,\r\n    \"max-empty-lines\": 1,\r\n    \"media-feature-colon-space-after\": \"always\",\r\n    \"media-feature-colon-space-before\": \"never\",\r\n    \"media-feature-no-missing-punctuation\": true,\r\n    \"media-feature-range-operator-space-after\": \"always\",\r\n    \"media-feature-range-operator-space-before\": \"always\",\r\n    \"media-query-list-comma-newline-after\": \"always-multi-line\",\r\n    \"media-query-list-comma-space-after\": \"always-single-line\",\r\n    \"media-query-list-comma-space-before\": \"never\",\r\n    \"media-query-parentheses-space-inside\": \"never\",\r\n    \"no-eol-whitespace\": true,\r\n    \"no-invalid-double-slash-comments\": true,\r\n    \"no-missing-eof-newline\": true,\r\n    \"number-leading-zero\": \"always\",\r\n    \"number-no-trailing-zeros\": true,\r\n    \"number-zero-length-no-unit\": true,\r\n    \"property-case\": \"lower\",\r\n    \"rule-non-nested-empty-line-before\": [ \"always-multi-line\", {\r\n      \"ignore\": [\"after-comment\"],\r\n    } ],\r\n    \"selector-combinator-space-after\": \"always\",\r\n    \"selector-combinator-space-before\": \"always\",\r\n    \"selector-list-comma-newline-after\": \"always-multi-line\",\r\n    \"selector-list-comma-space-before\": \"never\",\r\n    \"selector-pseudo-element-case\": \"lower\",\r\n    \"selector-pseudo-class-case\": \"lower\",\r\n    \"selector-pseudo-element-colon-notation\": \"double\",\r\n    \"selector-type-case\": \"lower\",\r\n    \"string-no-newline\": true,\r\n    \"unit-no-unknown\": true,\r\n    \"unit-case\": \"lower\",\r\n    \"value-list-comma-newline-after\": \"always-multi-line\",\r\n    \"value-list-comma-space-after\": \"always-single-line\",\r\n    \"value-list-comma-space-before\": \"never\",\r\n  },\r\n}\r\n```\r\n\r\nWhen I run the Gulp task with stylelint, I get the following error:\r\n\r\n```\r\nError in plugin 'gulp-stylelint'\r\nMessage:\r\n    Undefined rule \"at-rule-name-case\"\r\nDetails:\r\n    code: 78\r\n```\r\n\r\nI isolated that rule:\r\n\r\n``` json\r\n{\r\n  \"rules\": {\r\n    \"at-rule-name-case\": \"lower\",\r\n  },\r\n}\r\n```\r\n\r\nI get the same error:\r\n\r\n```\r\nError in plugin 'gulp-stylelint'\r\nMessage:\r\n    Undefined rule \"at-rule-name-case\"\r\nDetails:\r\n    code: 78\r\n```\r\n\r\nI try to figure out what exactly is causing the failure. It does not seem to be the syntax, because I tested the plugin with other rules:\r\n\r\n``` json\r\n{\r\n  \"rules\": {\r\n    \"at-rule-empty-line-before\": [ \"always\", {\r\n      \"except\": [ \"blockless-group\", \"first-nested\" ],\r\n      \"ignore\": [\"after-comment\"],\r\n    } ],\r\n  },\r\n}\r\n```\r\n\r\n``` json\r\n{\r\n  \"rules\": {\r\n    \"value-list-comma-newline-after\": \"always-multi-line\",\r\n    \"value-list-comma-space-after\": \"always-single-line\",\r\n    \"value-list-comma-space-before\": \"never\",\r\n  },\r\n}\r\n```\r\n\r\nThese rules run as expected. I return to my original rule set, and solely remove the rule in question. By doing that, another rule gave an error:\r\n\r\n```\r\nError in plugin 'gulp-stylelint'\r\nMessage:\r\n    Undefined rule \"function-name-case\"\r\nDetails:\r\n    code: 78\r\n```\r\n\r\nI continued this process of removing the rules that gave me the error. The following are the error messages given by those rules inclusion:\r\n\r\n```\r\nError in plugin 'gulp-stylelint'\r\nMessage:\r\n    Undefined rule \"property-case\"\r\nDetails:\r\n    code: 78\r\n```\r\n\r\n```\r\nError in plugin 'gulp-stylelint'\r\nMessage:\r\n    Undefined rule \"selector-pseudo-element-case\"\r\nDetails:\r\n    code: 78\r\n```\r\n\r\n```\r\nError in plugin 'gulp-stylelint'\r\nMessage:\r\n    Undefined rule \"selector-pseudo-class-case\"\r\nDetails:\r\n    code: 78\r\n```\r\n\r\n```\r\nError in plugin 'gulp-stylelint'\r\nMessage:\r\n    Undefined rule \"unit-case\"\r\nDetails:\r\n    code: 78\r\n```\r\n\r\nAll of these rules have the value `lower`, so I thought that the error had to do with this. I checked the stylelint rules, and all of these failing rules can take `lower` as a value. Not only that, but there are other rules like `color-hex-case` and `selector-type-case` that have the value `lower` and do not produce an error.\r\n\r\nWhy does the rules `at-rule-name-case`, `function-name-case`, `property-case`, `selector-pseudo-element-case`, `selector-pseudo-class-case`, and `unit-case` produces the error `Undefined rule` when the other rules are capable of running fine?"},"comment":{"url":"https://api.github.com/repos/olegskl/gulp-stylelint/issues/comments/232466533","html_url":"https://github.com/olegskl/gulp-stylelint/issues/18#issuecomment-232466533","issue_url":"https://api.github.com/repos/olegskl/gulp-stylelint/issues/18","id":232466533,"user":{"login":"olegskl","id":298275,"avatar_url":"https://avatars.githubusercontent.com/u/298275?v=3","gravatar_id":"","url":"https://api.github.com/users/olegskl","html_url":"https://github.com/olegskl","followers_url":"https://api.github.com/users/olegskl/followers","following_url":"https://api.github.com/users/olegskl/following{/other_user}","gists_url":"https://api.github.com/users/olegskl/gists{/gist_id}","starred_url":"https://api.github.com/users/olegskl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olegskl/subscriptions","organizations_url":"https://api.github.com/users/olegskl/orgs","repos_url":"https://api.github.com/users/olegskl/repos","events_url":"https://api.github.com/users/olegskl/events{/privacy}","received_events_url":"https://api.github.com/users/olegskl/received_events","type":"User","site_admin":false},"created_at":"2016-07-13T19:49:55Z","updated_at":"2016-07-13T19:49:55Z","body":"Hello. Thanks for reporting it. I'll handle it tomorrow morning."}}
{"actor":{"display_login":"olegskl"}}