Skip to content

Conversation

@michalsnik
Copy link
Member

@michalsnik michalsnik commented Nov 11, 2018

This PR addresses issue #616

[x] Replaces white spaces with new line instead of just adding new line
[x] Improves binding error message
[x] Improves event error message
[x] Improves directive error message


if (utils.isBindingAttribute(prop)) {
propType = 'Binding'
propName = prop.key.raw.argument
Copy link
Contributor

@armano2 armano2 Nov 11, 2018

Choose a reason for hiding this comment

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

argument can be null when v-bind="$props" and error message is:

Binding "null" should be on a new line.
Suggested change
propName = prop.key.raw.argument
propName = prop.key.raw.argument || 'object as props'

see. https://vuejs.org/v2/guide/components-props.html#Passing-the-Properties-of-an-Object

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch! I forgot about this case. I think it should actually report Directive "bind" should be on a new line

Copy link
Contributor

Choose a reason for hiding this comment

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

thank you 👍

@michalsnik michalsnik merged commit 176aa8b into master Nov 12, 2018
@michalsnik michalsnik deleted the 616-update-max-attrs-per-line branch November 12, 2018 21:42
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