- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 681
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(eslint-plugin-vue): [valid-v-bind-sync] Added Case: when valid is then valid .sync #1335
Conversation
… Valid Signed-off-by: Moulik Aggarwal <qwertymoulik@gmail.com>
Signed-off-by: Moulik Aggarwal <qwertymoulik@gmail.com>
is
then valid .sync
is
then valid .sync
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.
Thank you for this PR!
I have some change requests.
Signed-off-by: Moulik Aggarwal <qwertymoulik@gmail.com>
Signed-off-by: Moulik Aggarwal <qwertymoulik@gmail.com>
Hy @ota-meshi I have updated your changes and added a cli utility also, as it helps us to check individual rules and makes our development faster. |
Also, Can you please add |
I'm currently maintaining this repository almost alone, so I can't afford to accept all PR during the |
@ota-meshi I think I can help you in that as I am working to be a active-contributor not for just hacktoberfest. I can help in code review as I already do in my company. |
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 reply. I posted some comments.
if (attr.key.type === 'VIdentifier' && attr.key.name === 'is') return true | ||
|
||
// check for `:is` `bind` attribute | ||
if (attr.key.type === 'VDirectiveKey' && attr.key.argument.name === 'is') |
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.
You need to check if it is v-bind. Also, the argument can be null.
https://github.com/vuejs/vue-eslint-parser/blob/master/docs/ast.md#vdirectivekey
In addition, could you add a test to make sure it is not judged as is
?
<tr v-on:is="myRow" :some-prop.sync="somePropValue">
<tr v-bind="myRow" :some-prop.sync="somePropValue">
package.json
Outdated
@@ -19,7 +19,8 @@ | |||
"version": "npm run lint -- --fix && git add .", | |||
"update": "node ./tools/update.js", | |||
"docs:watch": "vuepress dev docs", | |||
"docs:build": "vuepress build docs" | |||
"docs:build": "vuepress build docs", | |||
"tests": "mocha" |
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.
Do not change the script. You may be able to use npx mocha
.
I would like to share the fix related to this issue with another fix. So I'll fix this PR and merge it. |
Fixes #1298
Signed-off-by: Moulik Aggarwal qwertymoulik@gmail.com