Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #616 - update max attrs per line error message, remove white spaces #643

Merged
merged 5 commits into from
Nov 12, 2018

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.

2 participants