comment on top doesn't have `parent`
alexander-akait opened this issue · 1 comments
alexander-akait commented
Input:
// this is a comment which results in an error!
.foo
color: pink
Output (root):
Root {
raws: { semicolon: undefined, before: '' },
type: 'root',
nodes:
[ Comment {
raws: [Object],
type: 'comment',
text: 'this is a comment which results in an error!' },
Rule {
raws: [Object],
type: 'rule',
nodes: [Array],
selector: '.foo',
parent: [Circular],
source: [Object],
lastEach: 2,
indexes: {} } ],
source:
{ start: { line: 1, column: 1 },
end: { line: 3, column: 14 },
input:
Input {
css: '// this is a comment which results in an error!\n.foo\n color: pink\n',
file: '/home/evilebottnawi/IdeaProjects/stylelint/test.sass' } },
lastEach: 2,
indexes: {},
rawCache: { semicolon: undefined } }
It is break stylelint in some places stylelint/stylelint#3244. It is bug or expected behaviour?
Grawl commented
fixed this with @at-root
workaround
stylelint/stylelint#3244 (comment)