{"action":"created","issue":{"url":"https://api.github.com/repos/stylelint/stylelint/issues/2343","repository_url":"https://api.github.com/repos/stylelint/stylelint","labels_url":"https://api.github.com/repos/stylelint/stylelint/issues/2343/labels{/name}","comments_url":"https://api.github.com/repos/stylelint/stylelint/issues/2343/comments","events_url":"https://api.github.com/repos/stylelint/stylelint/issues/2343/events","html_url":"https://github.com/stylelint/stylelint/issues/2343","id":206952967,"number":2343,"title":"A bug for 'max-empty-lines'","user":{"login":"Leucetios","id":4191018,"avatar_url":"https://avatars.githubusercontent.com/u/4191018?v=3","gravatar_id":"","url":"https://api.github.com/users/Leucetios","html_url":"https://github.com/Leucetios","followers_url":"https://api.github.com/users/Leucetios/followers","following_url":"https://api.github.com/users/Leucetios/following{/other_user}","gists_url":"https://api.github.com/users/Leucetios/gists{/gist_id}","starred_url":"https://api.github.com/users/Leucetios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Leucetios/subscriptions","organizations_url":"https://api.github.com/users/Leucetios/orgs","repos_url":"https://api.github.com/users/Leucetios/repos","events_url":"https://api.github.com/users/Leucetios/events{/privacy}","received_events_url":"https://api.github.com/users/Leucetios/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":3,"created_at":"2017-02-11T03:04:14Z","updated_at":"2017-02-11T15:33:29Z","closed_at":null,"body":"> Describe the issue. Is it a bug or a feature request (new rule, new option, etc.)?\r\n\r\nBugs, opinions and one idea.\r\n\r\n> Which rule, if any, is this issue related to?\r\n\r\n`max-empty-lines`\r\n\r\n> What CSS is needed to reproduce this issue?\r\n\r\n```css\r\n\r\n\r\n\r\n\r\n\r\n/*\r\n  The above should be warning because my config is \"max-empty-lines\": 2 \r\n  And there is 3 empty lines and no warning, how?\r\n  Because max-empty-lines doesn't consider beginning of the file.\r\n*/\r\n\r\n.selector {\r\n  color: #fff;\r\n}\r\n\r\n/**\r\n * Call me Ishmael.\r\n *\r\n *\r\n *\r\n * Some years ago -- never mind how log precisely -- ...\r\n *\r\n */\r\n/* \r\n * Lets look at this. Rule's documentation says this comment block has empty lines and should be warning.\r\n * Again there is no warning. But in my opinion, shouldn't be either.\r\n * Because comment block has not actually empty lines, right?\r\n * Please pay attention to the stars on the left.\r\n */\r\n \r\n#samerule {\r\n  background-image: url('funnybugishere.png');\r\n}\r\n\r\n/*\r\n\r\n\r\n\r\n\r\n\r\n\r\n 40th Line: Now we have empty lines in comment block. Following lines are considered warning: 37, 38, 39 and 40\r\n Which are totaly weird. 40th line is not empty and you can see that by looking previous line.\r\n And again in my opinion these lines should be warning for this comment block: 36, 37, 38 and 39\r\n By letting only 2 adjacent empty lines (\"max-empty-lines\": 2)\r\n*/\r\n```\r\n\r\n> What stylelint configuration is needed to reproduce this issue?\r\n\r\n```json\r\n{\r\n  \"rules\": {\r\n    \"max-empty-lines\": 2\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\nDoesn't matter.\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\nI expected this:\r\n```shell\r\nsomething.css\r\n  3:1  ×  Expected no more than 2 empty line(s)   max-empty-lines\r\n 36:1  ×  Expected no more than 2 empty line(s)   max-empty-lines\r\n 37:1  ×  Expected no more than 2 empty line(s)   max-empty-lines\r\n 38:1  ×  Expected no more than 2 empty line(s)   max-empty-lines\r\n 39:1  ×  Expected no more than 2 empty line(s)   max-empty-lines\r\n```\r\n\r\n> What actually happened (e.g. what warnings or errors you are getting)?\r\n\r\nThe following warnings were flagged:\r\n\r\n```shell\r\nsomething.css\r\n 37:1  ×  Expected no more than 2 empty line(s)   max-empty-lines\r\n 38:1  ×  Expected no more than 2 empty line(s)   max-empty-lines\r\n 39:1  ×  Expected no more than 2 empty line(s)   max-empty-lines\r\n 40:1  ×  Expected no more than 2 empty line(s)   max-empty-lines\r\n```\r\n\r\n> So tell us about your idea?\r\n\r\nWell, do you guys consider about adding optional secondary option `ignore: ['comment']` to the rule?\r\nThis would be a good improving I think. Comments should be ignored with secondary option for `max-empty-line`.\r\n\r\n> Last thing, have you ever dealt with the code side of this?\r\n\r\nYes, I have. In fact, I solved all of these (including ignore option). But I didn't test with stylelint way. Because I don't know how I can.  Believe me, there is a something about documentation. It is my first time with Github and Github things. So I don't know how I can help the development of this project.  What is the procedure? \r\n\r\nSorry for my language. It is not my native language."},"comment":{"url":"https://api.github.com/repos/stylelint/stylelint/issues/comments/279152741","html_url":"https://github.com/stylelint/stylelint/issues/2343#issuecomment-279152741","issue_url":"https://api.github.com/repos/stylelint/stylelint/issues/2343","id":279152741,"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":"2017-02-11T15:33:29Z","updated_at":"2017-02-11T15:33:29Z","body":"@davidtheclark i am testing with `root.source.input.css`, error have not correct position, but we should change `root.toString()` to `root.source.input.css` because this may cause further errors"}}
{"actor":{"display_login":"evilebottnawi"}}