{"action":"created","issue":{"url":"https://api.github.com/repos/stylelint/stylelint/issues/397","labels_url":"https://api.github.com/repos/stylelint/stylelint/issues/397/labels{/name}","comments_url":"https://api.github.com/repos/stylelint/stylelint/issues/397/comments","events_url":"https://api.github.com/repos/stylelint/stylelint/issues/397/events","html_url":"https://github.com/stylelint/stylelint/issues/397","id":108492497,"number":397,"title":"declaration-block-semicolon-newline-before: unable to handle declarations on root","user":{"login":"mahtd","id":6687627,"avatar_url":"https://avatars.githubusercontent.com/u/6687627?v=3","gravatar_id":"","url":"https://api.github.com/users/mahtd","html_url":"https://github.com/mahtd","followers_url":"https://api.github.com/users/mahtd/followers","following_url":"https://api.github.com/users/mahtd/following{/other_user}","gists_url":"https://api.github.com/users/mahtd/gists{/gist_id}","starred_url":"https://api.github.com/users/mahtd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mahtd/subscriptions","organizations_url":"https://api.github.com/users/mahtd/orgs","repos_url":"https://api.github.com/users/mahtd/repos","events_url":"https://api.github.com/users/mahtd/events{/privacy}","received_events_url":"https://api.github.com/users/mahtd/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-26T20:00:59Z","updated_at":"2015-09-26T23:03:22Z","closed_at":"2015-09-26T23:03:10Z","body":"In Sass or other extensions that allow variables, declarations are allowed on the root. Stylelint errors when it encounters these though. `declaration-block-semicolon-newline-before` throws this error, but other plugins might be affected since it's coming from a shared utility\r\n\r\nadded to `warningFreeBasics`:\r\n\r\n```js\r\ntr.ok(\"foo: bar;\", \"declarations on root\")\r\n```\r\n\r\nError:\r\n\r\n```\r\nTypeError: Cannot read property 'length' of undefined\r\n    at exports.default (/Users/mattduckman/Developer/stylelint/src/utils/cssStatementBlockString.js:16:81)\r\n    at /Users/mattduckman/Developer/stylelint/src/rules/declaration-block-semicolon-newline-before/index.js:39:23\r\n    at /Users/mattduckman/Developer/stylelint/node_modules/postcss/lib/container.js:88:34\r\n    at /Users/mattduckman/Developer/stylelint/node_modules/postcss/lib/container.js:73:26\r\n    at Root.each (/Users/mattduckman/Developer/stylelint/node_modules/postcss/lib/container.js:59:22)\r\n    at Root.walk (/Users/mattduckman/Developer/stylelint/node_modules/postcss/lib/container.js:72:21)\r\n    at Root.walkDecls (/Users/mattduckman/Developer/stylelint/node_modules/postcss/lib/container.js:86:25)\r\n    at /Users/mattduckman/Developer/stylelint/src/rules/declaration-block-semicolon-newline-before/index.js:30:10\r\n    at LazyResult.run (/Users/mattduckman/Developer/stylelint/node_modules/postcss/lib/lazy-result.js:201:20)\r\n    at LazyResult.sync (/Users/mattduckman/Developer/stylelint/node_modules/postcss/lib/lazy-result.js:188:32)\r\n```"},"comment":{"url":"https://api.github.com/repos/stylelint/stylelint/issues/comments/143503108","html_url":"https://github.com/stylelint/stylelint/issues/397#issuecomment-143503108","issue_url":"https://api.github.com/repos/stylelint/stylelint/issues/397","id":143503108,"user":{"login":"davidtheclark","id":628431,"avatar_url":"https://avatars.githubusercontent.com/u/628431?v=3","gravatar_id":"","url":"https://api.github.com/users/davidtheclark","html_url":"https://github.com/davidtheclark","followers_url":"https://api.github.com/users/davidtheclark/followers","following_url":"https://api.github.com/users/davidtheclark/following{/other_user}","gists_url":"https://api.github.com/users/davidtheclark/gists{/gist_id}","starred_url":"https://api.github.com/users/davidtheclark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidtheclark/subscriptions","organizations_url":"https://api.github.com/users/davidtheclark/orgs","repos_url":"https://api.github.com/users/davidtheclark/repos","events_url":"https://api.github.com/users/davidtheclark/events{/privacy}","received_events_url":"https://api.github.com/users/davidtheclark/received_events","type":"User","site_admin":false},"created_at":"2015-09-26T23:03:22Z","updated_at":"2015-09-26T23:03:22Z","body":"Thanks!"}}