Eslint-plugin-vue: 'v-model' directives aren't supported on <Input> elements?

Created on 8 Sep 2017  Â·  19Comments  Â·  Source: vuejs/eslint-plugin-vue

I base iView.
I get error

image

Most helpful comment

mycode is v-model="xx | myfilter "
It warn me, v-model' directives require the attribute value which is valid as LHS.
How to solve this problem?

All 19 comments

@thearabbit can you paste here an error message?

Thanks for you reply

[vue-language-server] 'v-model' directives aren't supported on <Input> elements.
Creates a two-way binding on a form input element or a component.

The same with <Select ....>

Thank you for this issue.

I could not reproduce it on this plugin. Also, the 2nd line doesn't seem the message this plugin generates. It might be the message of vue-language-server own.

Excuse me, could advise fixing?

vetur is using [email protected] and [email protected]

and there was bug with this but it was solved

https://github.com/vuejs/vetur/issues/303

@thearabbit I'm guessing you are using vscode and vetur. As @armano2 mentioned, please open an issue on there. I'm not sure what happens in the vue-language-server.

i got confirmation from vetur team, they already upgraded version

https://github.com/vuejs/vetur/blob/master/server/package.json#L21
The fix will be released in next version, soon.

Look great!
💯

After update, still get error
image

My .eslintrc

{
    "extends": [
        "eslint:recommended",
        "plugin:vue/recommended" // or "plugin:vue/base"
    ],
    "parser": "vue-eslint-parser",
    "parserOptions": {
        "ecmaVersion": 2017,
        "sourceType": "module"
    },
    "rules": {
        "no-console": ["error"],
        "semi": ["error", "always"],
        "quotes": ["error", "single"]
        // override/add rules" settings here
        // "vue/valid-v-if": "error"
    }
}

Hi @thearabbit, @octref will release new version soon. The current vetur version is 0.9.5.

Oh, thanks again

Could we close this issue?

Don't repro for me on latest.

Ok guys, I'm closing this issue. Feel free to reopen if you'll experience any problems, but if you don't get the error when running eslint from the console it's most likely an upstream issue, which should rather be addressed in vuetur repository.

mycode is v-model="xx | myfilter "
It warn me, v-model' directives require the attribute value which is valid as LHS.
How to solve this problem?

mycode is v-model="xx | myfilter "
It warn me, v-model' directives require the attribute value which is valid as LHS.
How to solve this problem?

Same here :(

mycode is v-model="xx | myfilter "
It warn me, v-model' directives require the attribute value which is valid as LHS.
How to solve this problem?

same here!

@lovezyg @zaqisilverano @vitorvr i made PR about this bug #699 and ticket #700

Please create new ticket next time, no one notice it

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xiGUAwanOU picture xiGUAwanOU  Â·  3Comments

sqal picture sqal  Â·  3Comments

KristofMorva picture KristofMorva  Â·  4Comments

apertureless picture apertureless  Â·  4Comments

deangoku picture deangoku  Â·  4Comments