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

Wrap non-CssSyntaxError into stylelint results #211

Merged

Conversation

chinesedfan
Copy link
Member

At the beginning, this processor will throw every error to stylelint. But stylelint can only handle CssSyntaxError. (#131)

After #142, non-CssSyntaxErrors are ignored, which causes some confusions(#204, #210).

I think we should wrap those errors into stylelint results. So that both requirements are met.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 100.0% when pulling 83e9881 on chinesedfan:better_error_handler into 3533d05 on styled-components:master.

return stylelintResult
} else {
// For other errors, wrap them into the result
return Object.assign({}, stylelintResult, {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this get displayed to the user?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For Node.js API users, it is yes. But I found CLI didn't print very pretty output. The latest commit fixes it.

Copy link
Member

@emilgoldsmith emilgoldsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@emilgoldsmith emilgoldsmith merged commit b0a1fec into styled-components:master Sep 17, 2018
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.

3 participants