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

New: Add vue/no-deprecated-v-on-number-modifiers rule #1079

Merged

Conversation

yoyo930021
Copy link
Member

This PR adds the vue/no-deprecated-v-on-number-modifiers rule.

This rule reports use of deprecated KeyboardEvent.keyCode modifier on v-on directive

ref #1035

<!-- ✓ GOOD -->
<input v-on:keyup.page-down="onArrowUp">
<input @keyup.page-down="onArrowUp">
<input @keyup.9="onArrowUp"> <!-- 9 is KeyboardEvent.key -->
Copy link
Member

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.
Almost look good to me.

I could not set KeyboardEvent.key to 9. Can you tell me which browser can reproduce it?

Copy link
Member Author

Choose a reason for hiding this comment

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

When you keyup 9 on 60% keyborad.

https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values
At the bottom of the linked page.

Copy link
Member

Choose a reason for hiding this comment

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

Thank you for teaching me! NUMPAD! I misunderstood the Tab key.

@yoyo930021
Copy link
Member Author

@ota-meshi
Screen Shot 2020-03-19 at 5 29 17 PM

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for your contribution.

@ota-meshi ota-meshi mentioned this pull request Mar 19, 2020
75 tasks
@ota-meshi ota-meshi merged commit 335692e into vuejs:master Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants