Skip to content

Conversation

@halfzebra
Copy link
Owner

No description provided.


module.exports = function formatElmCompilerErrors(messages) {
var errors = messages.errors;
var warnings = messages.warnings;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not to use const and destructuring?

Copy link
Owner Author

Choose a reason for hiding this comment

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

@fobos this one is supposed to be running in the browser and under the node(without being transpiled by Babel)

return errors.length > 0
? {
errors: errors
.map(x =>
Copy link
Owner Author

Choose a reason for hiding this comment

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

I shouldn't be using arrow functions here because of browser compatibility issues.

@halfzebra halfzebra merged commit db4986d into master Sep 26, 2017
@halfzebra halfzebra deleted the better-errors branch September 26, 2017 18:31
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.

3 participants