Skip to content
This repository was archived by the owner on May 14, 2021. It is now read-only.

Add newline between components' styles #11

Closed
wants to merge 2 commits into from

Conversation

geniusgordon
Copy link
Contributor

@geniusgordon geniusgordon commented Nov 26, 2016

#9

declare extractedCSS as an array, use .join('\n') when return

declare extractedCSS as an array, use `.join('\n')` when return
@mxstbr
Copy link
Member

mxstbr commented Nov 26, 2016

Could you add some tests for the new behaviour please? Thank you!

@zalmoxisus
Copy link

zalmoxisus commented Nov 26, 2016

Seems like decreasing the perf almost twice for this operation: https://jsperf.com/string-concat-via-array.

UPDATE: Sorry it's just for stylelint, so perf doesn't matter :-D

@geniusgordon
Copy link
Contributor Author

@mxstbr I don't know how to write tests for this, can't come up with an invalid testcase that produce the rule-non-nested-empty-line-before error. Any suggestions? Thank you!

@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.048% when pulling 7d8f1f5 on geniusgordon:master into 9d904c9 on styled-components:master.

@geniusgordon
Copy link
Contributor Author

@zalmoxisus nice point though, never notice that perf issue

@mxstbr
Copy link
Member

mxstbr commented Apr 1, 2017

Sorry for the extremely slow response here, does this fix your issue? If so, why can't we add tests for it?

@geniusgordon
Copy link
Contributor Author

It's ok now! I disabled rule-empty-line-before like the comment in #9 said

@EnoahNetzach
Copy link
Contributor

EnoahNetzach commented Apr 24, 2017

I need this fix..
Sorry if I opened another PR, but I'll cherry-pick these commits, so attribution should remain untouched.

@mxstbr mxstbr closed this May 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants