-
Notifications
You must be signed in to change notification settings - Fork 61
Expected empty line between multiple components #9
Comments
As a workaround it could help to add an additional rule to your .stylelintrc file:
There are more options for this available. See here: http://stylelint.io/user-guide/rules/rule-non-nested-empty-line-before/ The default (which is enforced by using the stylelint-config-standard package) is as follows:
|
@joggienl That doesn't fix it for me. Only way of getting rid of it for me is to turn it off completely: {
"processors": ["stylelint-processor-styled-components"],
"extends": "stylelint-config-standard",
"syntax": "scss",
"rules": {
"rule-empty-line-before": 0
}
} |
Maybe |
@chaucerbao Actually the list of ignored rules should be removed completely. See this pr: #23. As I understand it, this lib modifies the Result passed to stylelint, which can lead to swallowed errors that still cause stylelint to exit with an error code: #22 A better approach would be to just list the rules that should be ignored for this lib in the readme, so people can add it to their config. Or just create a preconfigured ruleset that people can extend, if you want to make it easy. |
@mxstbr If you need help with this repo I'd be happy to. Let me know if I can do anything! |
Below doesn't seems working "rules": {
"rule-empty-line-before": 0
} It gives this error: Invalid Option: Invalid option value "0" for rule "rule-empty-line-before" @ismay Does it works for you? I am using "stylelint": "^7.10.1",
"stylelint-config-standard": "^16.0.0",
"stylelint-processor-styled-components": "^0.1.0" |
@rajkuldip This is the way I'm using it: https://github.com/ismay/ismaywolff.nl/blob/develop/.stylelintrc I'm also on 7.10.1 |
|
@ismay - Thank you for your response. @NameFILIP: Thanks, mate. This solution just works fine. |
@mxstbr Thanks for the add 👍 I'll try to help fix some issues this week 🎉 🎉 |
@emilgoldsmith Yeah weird, but yes, this should be fixed 👍 |
I think I actually realized it's probably because we don't merge into master, and I think maybe it only closes issues if you merge into master, but since we were merging into 1.0 it doesn't see it as "integrated" (which I guess is also correct :)) |
Ah yeah of course |
I'm getting a rule-non-nested-empty-line-before error when I have multiple components in one file
I've got a file like this
and got this error
I've console.log the extractedCSS and it looks like this
I'm using:
The text was updated successfully, but these errors were encountered: