{"action":"created","issue":{"url":"https://api.github.com/repos/brigade/scss-lint/issues/594","labels_url":"https://api.github.com/repos/brigade/scss-lint/issues/594/labels{/name}","comments_url":"https://api.github.com/repos/brigade/scss-lint/issues/594/comments","events_url":"https://api.github.com/repos/brigade/scss-lint/issues/594/events","html_url":"https://github.com/brigade/scss-lint/issues/594","id":107008105,"number":594,"title":"Feature Request: NecessaryParentReference","user":{"login":"ifyoumakeit","id":3998604,"avatar_url":"https://avatars.githubusercontent.com/u/3998604?v=3","gravatar_id":"","url":"https://api.github.com/users/ifyoumakeit","html_url":"https://github.com/ifyoumakeit","followers_url":"https://api.github.com/users/ifyoumakeit/followers","following_url":"https://api.github.com/users/ifyoumakeit/following{/other_user}","gists_url":"https://api.github.com/users/ifyoumakeit/gists{/gist_id}","starred_url":"https://api.github.com/users/ifyoumakeit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ifyoumakeit/subscriptions","organizations_url":"https://api.github.com/users/ifyoumakeit/orgs","repos_url":"https://api.github.com/users/ifyoumakeit/repos","events_url":"https://api.github.com/users/ifyoumakeit/events{/privacy}","received_events_url":"https://api.github.com/users/ifyoumakeit/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/brigade/scss-lint/labels/enhancement","name":"enhancement","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-17T15:17:11Z","updated_at":"2015-09-24T18:23:43Z","closed_at":null,"body":"Regarding the use of combinators, ampersand, and `UnnecessaryParentReference`.\r\n\r\nSCSS shouldn't really compile `~ &` because it creates invalid CSS. `UnnecessaryParentReference` leads developers to drop the ampersands proceeding a combinator, despite SCSS not doing what it's supposed to do in the `~ &` case.  The parent selector is nice, but maybe there should be an additional linter to use `& ~ &` when the second value starts with an ampersand.\r\n\r\n**SCSS**\r\n```scss\r\n.foo {  \r\n  & ~ & {\r\n    background: green; // Valid\r\n  }\r\n  ~ & {\r\n    background: black; // Invalid\r\n  }\r\n}\r\n```\r\n**CSS**\r\n```css\r\n.foo ~ .foo {\r\n  background: green;\r\n}\r\n~ .foo {\r\n  background: black;\r\n}\r\n```\r\nIssue brought up with SASS: https://github.com/sass/sass/issues/1836\r\n\r\nMaybe `NecessaryParentReference`?"},"comment":{"url":"https://api.github.com/repos/brigade/scss-lint/issues/comments/143011188","html_url":"https://github.com/brigade/scss-lint/issues/594#issuecomment-143011188","issue_url":"https://api.github.com/repos/brigade/scss-lint/issues/594","id":143011188,"user":{"login":"sds","id":677877,"avatar_url":"https://avatars.githubusercontent.com/u/677877?v=3","gravatar_id":"","url":"https://api.github.com/users/sds","html_url":"https://github.com/sds","followers_url":"https://api.github.com/users/sds/followers","following_url":"https://api.github.com/users/sds/following{/other_user}","gists_url":"https://api.github.com/users/sds/gists{/gist_id}","starred_url":"https://api.github.com/users/sds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sds/subscriptions","organizations_url":"https://api.github.com/users/sds/orgs","repos_url":"https://api.github.com/users/sds/repos","events_url":"https://api.github.com/users/sds/events{/privacy}","received_events_url":"https://api.github.com/users/sds/received_events","type":"User","site_admin":false},"created_at":"2015-09-24T18:23:43Z","updated_at":"2015-09-24T18:23:43Z","body":"Hey @ifyoumakeit, this request makes sense to me. It's an quirky behavior of Sass that ultimately makes sense but is initially confusing. Thanks for the suggestion&mdash;happy to merge a pull request with the implementation."}}