- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 681
New Add vue/new-line-between-multiline-property
rule
#1080
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
New Add vue/new-line-between-multiline-property
rule
#1080
Conversation
vue/new-line-between-multiline-property
rule
complete #391 |
Thank you for this PR. I don't want to add this rule now because I'm not convinced that this rule conflicts with other eslint and eslint-plugin rules. |
Very interested in this rule. @ota-meshi What are the other rules this might conflict with? If the merge-conflicts can be resolved, I have access to multiple large, internal Vue codebases I can test on. |
At the very least, we should make sure that all the rules of ESLint core and their options don't conflict. Also, the style of object properties is not Vue.js-specific, so I think we need to check some of the other popular eslint-plugins as well. If find a conflicting rule, we should either fix this rule so that it doesn't conflict, or document a workaround. |
Thanks @ota-meshi @IWANABETHATGUY do you have time to resolve the merge-conflicts? |
|
Was finally able to make the time to apply this onto two very large codebases, and the results are pretty much flawless. There was an error with The only thing that I caught that seems unexpected is that it was applied to the contents of an unrelated static-method on the Vue component. It's not a big deal but it added new lines between an object that was inside the function. From: <script>
export default {
...,
errorCapture(err) {
logError(err, {
propA: {
...
},
propB: {
...
},
});
},
...
};
</script> To: <script>
export default {
...,
errorCapture(err) {
logError(err, {
propA: {
...
},
propB: {
...
},
});
},
...
};
</script> On a separate note, I'm got to checkout a bunch of the new ESlint Vue rules and I'm very impressed with all the new features! Great work :) |
could you give me some test case, so that i could fix it. |
Added it here IWANABETHATGUY#1 Specific error-case here |
@privatenumber , i add the callExpression test case, and you miss that , there should be a new line between |
There is a new line ? Thanks for the fix! I'll check it out soon. Can you also pull in |
i merge the latest master branch and pass all test. |
@ota-meshi Is it time to merge this feature ? |
First of all, thank you for your help. |
I extend {
'vue/html-indent': ['error', 'tab', {
alignAttributesVertically: false,
}],
'vue/html-self-closing': ['error', {
html: {
normal: 'never',
void: 'always',
component: 'always'
},
svg: 'always',
math: 'always'
}],
'vue/max-attributes-per-line': ['error', {
singleline: 0,
}],
'vue/html-closing-bracket-newline': ['error', {
singleline: 'never',
multiline: 'always',
}],
'vue/prop-name-casing': ['off'],
'vue/no-v-html': ['off'],
} |
@privatenumber Thank you for sharing it. |
I use airbnb-config-base with it. |
I wanted to know about that! Thank you. |
I checked the rules in airbnb-config-base and found many rules are enabled. Also, I'm using eslint-config-standard and it works pretty well there too. So in most cases, I don't think there will be conflicts. Thank you for helping me with the check. |
…into feature/new-line-between-multi-line-property
….com:IWANABETHATGUY/eslint-plugin-vue into feature/new-line-between-multi-line-property
….com:IWANABETHATGUY/eslint-plugin-vue into feature/new-line-between-multi-line-property
@ota-meshi could you please review again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late check.
Looks good to me! Thank you!
No description provided.