Skip to content

How to prevent vue/valid-v-on on custom modifiers? #519

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

Closed
mesqueeb opened this issue Jul 11, 2018 · 2 comments
Closed

How to prevent vue/valid-v-on on custom modifiers? #519

mesqueeb opened this issue Jul 11, 2018 · 2 comments

Comments

@mesqueeb
Copy link
Contributor

Having set
Vue.config.keyCodes = { 'enter-strict': 13 }
Gives me the vue/valid-v-on error for enter-strict. How can prevent this?

Best regards,

@michalsnik
Copy link
Member

Hey @mesqueeb

At this moment you can either use built-in enter modifier, or disable this rule.

You can also create a PR with an extra option to extend allowed modifiers with a custom list :)

@beliolfa
Copy link

beliolfa commented Aug 14, 2018

I am facing this as well.

Whats the right way to disable this rule? setting vue/valid-v-on: 0 is not working for me :(

eslint-disable is not working either

<!-- eslint-disable -->
      <GlobalEvents
        v-if="!selected"
        @keyup.digit1="select(1)"
        @keyup.digit2="select(2)"
        @keyup.digit3="select(3)"
        @keyup.digit4="select(4)"
        @keyup.digit5="select(5)"
        @keyup.digit6="select(6)"
        @keyup.digit7="select(7)"
      />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants