{"action":"created","issue":{"url":"https://api.github.com/repos/stylelint/stylelint/issues/2326","repository_url":"https://api.github.com/repos/stylelint/stylelint","labels_url":"https://api.github.com/repos/stylelint/stylelint/issues/2326/labels{/name}","comments_url":"https://api.github.com/repos/stylelint/stylelint/issues/2326/comments","events_url":"https://api.github.com/repos/stylelint/stylelint/issues/2326/events","html_url":"https://github.com/stylelint/stylelint/issues/2326","id":206099657,"number":2326,"title":"`selector-type-no-unknown` doesn't respect CSS namespaces","user":{"login":"bedney","id":13412,"avatar_url":"https://avatars3.githubusercontent.com/u/13412?v=3","gravatar_id":"","url":"https://api.github.com/users/bedney","html_url":"https://github.com/bedney","followers_url":"https://api.github.com/users/bedney/followers","following_url":"https://api.github.com/users/bedney/following{/other_user}","gists_url":"https://api.github.com/users/bedney/gists{/gist_id}","starred_url":"https://api.github.com/users/bedney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bedney/subscriptions","organizations_url":"https://api.github.com/users/bedney/orgs","repos_url":"https://api.github.com/users/bedney/repos","events_url":"https://api.github.com/users/bedney/events{/privacy}","received_events_url":"https://api.github.com/users/bedney/received_events","type":"User","site_admin":false},"labels":[{"id":210042527,"url":"https://api.github.com/repos/stylelint/stylelint/labels/status:%20discussion","name":"status: discussion","color":"0023ee","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-02-08T05:24:09Z","updated_at":"2017-02-28T17:36:00Z","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\nThe `selector-type-no-unknown` rule doesn't take CSS namespace into account.\r\n\r\n> Which rule, if any, is this issue related to?\r\n\r\n`selector-type-no-unknown`\r\n\r\n> What CSS is needed to reproduce this issue?\r\n\r\ne.g.\r\n\r\n```css\r\n\r\n@namespace todomvc url(urn:app:todomvc);\r\n\r\ntodomvc|app {\r\n    display: block;\r\n    position: absolute;\r\n    height: 100%;\r\n    width: 100%;\r\n    margin: 0;\r\n    padding: 0;\r\n}\r\n```\r\n\r\n> What stylelint configuration is needed to reproduce this issue?\r\n\r\ne.g.\r\n\r\n```json\r\n{\r\n    \"extends\": \"stylelint-config-standard\",\r\n    \"rules\": {\r\n        \"selector-type-no-unknown\": [true, { \"severity\": \"warning\" }]\r\n    }\r\n}\r\n```\r\n\r\n> Which version of stylelint are you using?\r\n\r\n`7.8.0`\r\n\r\n> How are you running stylelint: CLI, PostCSS plugin, Node API?\r\n\r\nCLI with `stylelint **/*.css`\r\n\r\n> Does your issue relate to non-standard syntax (e.g. SCSS, nesting, etc.)?\r\n\r\nNo. CSS namespaces are a W3C-approved syntax.\r\n\r\n> What did you expect to happen?\r\n\r\n\"No warnings to be flagged.\"\r\n\r\n> What actually happened (e.g. what warnings or errors you are getting)?\r\n\r\n\"The following warnings were flagged:\"\r\n\r\n```shell\r\n   12:8    warn    Unexpected unknown type selector \"app\"                         selector-type-no-unknown\r\n```\r\n\r\nNote that this bug can be fixed by altering `selector-type-no-unknown/index.js` by inserting this at line 85:\r\n\r\n```js\r\nif (optionsMatches(options, \"ignoreTypes\", tagNode.namespace + '|' + tagNode.value)) {\r\n            return\r\n          }\r\n```\r\n\r\nand then by updating the `.stylelintrc` to have:\r\n\r\n```json\r\n        \"selector-type-no-unknown\": [true, { \r\n            \"severity\": \"warning\", \r\n            \"ignoreTypes\": [\"/^.*\\\\|.*$/\"] \r\n        }],\r\n```"},"comment":{"url":"https://api.github.com/repos/stylelint/stylelint/issues/comments/283109789","html_url":"https://github.com/stylelint/stylelint/issues/2326#issuecomment-283109789","issue_url":"https://api.github.com/repos/stylelint/stylelint/issues/2326","id":283109789,"user":{"login":"jeddy3","id":808227,"avatar_url":"https://avatars3.githubusercontent.com/u/808227?v=3","gravatar_id":"","url":"https://api.github.com/users/jeddy3","html_url":"https://github.com/jeddy3","followers_url":"https://api.github.com/users/jeddy3/followers","following_url":"https://api.github.com/users/jeddy3/following{/other_user}","gists_url":"https://api.github.com/users/jeddy3/gists{/gist_id}","starred_url":"https://api.github.com/users/jeddy3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeddy3/subscriptions","organizations_url":"https://api.github.com/users/jeddy3/orgs","repos_url":"https://api.github.com/users/jeddy3/repos","events_url":"https://api.github.com/users/jeddy3/events{/privacy}","received_events_url":"https://api.github.com/users/jeddy3/received_events","type":"User","site_admin":false},"created_at":"2017-02-28T17:35:59Z","updated_at":"2017-02-28T17:35:59Z","body":"> seems slightly incorrect and might be just that you mistyped. Shouldn't that be [\"todomvc\",\"other\"]?\r\n\r\nYes, it should have been :)\r\n\r\n> It would be great if the ignoreNamespaces option could (like the ignoreTypes option) take a RegExp. \r\n\r\nAgreed.\r\n\r\nI'm about to dash off on holiday. I'll leave this issue open for discussion while I'm away so that the rest of @stylelint/core can jump in if they've any input on the new options. If there aren't any objections by the time I'm back, I'll label this up then as `type: option` and `status: help wanted`.\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"jeddy3"}}