Skip to content

Conversation

garthenweb
Copy link
Contributor

#141 was not working for me. This PR also includes a test case to make sure the issue is fixed.


The linter crashes with an error when the spread operator
was used in a stylesheet object. This fix will ignore all
styles that are not of type Property.

Fix #129

@coveralls
Copy link

coveralls commented Apr 10, 2017

Coverage Status

Coverage increased (+0.06%) to 71.783% when pulling 5822cf9 on garthenweb:fix/stylesheet-spread-operator into 47b1ef3 on Intellicode:master.

The linter crashes with an error when the spread operator
was used in a stylesheet object. This fix will ignore all
styles that are not of type Property.

Fix Intellicode#129
@garthenweb garthenweb force-pushed the fix/stylesheet-spread-operator branch from 5822cf9 to 34baf7a Compare April 10, 2017 11:43
@coveralls
Copy link

coveralls commented Apr 10, 2017

Coverage Status

Coverage increased (+0.06%) to 71.783% when pulling 34baf7a on garthenweb:fix/stylesheet-spread-operator into 47b1ef3 on Intellicode:master.

@garthenweb
Copy link
Contributor Author

I just noticed that there is an even better position to filter for properties so I moved it into the astHelpers.getStyleDeclarations function (before it was in StyleSheets.prototype.markAsUsed).

@Intellicode Intellicode merged commit 5c3f724 into Intellicode:master Apr 10, 2017
@Intellicode
Copy link
Owner

Thanks! I'll create a release soonish!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spread operator in StyleSheet causes linter to crash

3 participants