Iview: [Bug Report]Col components are wrong in eslint-plugin-vue

Created on 16 Jan 2018  ·  17Comments  ·  Source: iview/iview

Environment

vue 2.5.13/eslint-plugin-vue 4.0.0

Reproduction link

https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/no-parsing-error.md

Steps to reproduce

eslint-plugin-vue已经是正式版,在eslint的配置下,运行如下代码

<Col>
  <Button>test</Button>
</Col>

eslint检查报错

3:7  error  Parsing error: x-invalid-end-tag  vue/no-parsing-error

What is expected?

因为col是自闭合标签,希望有有效的方法解决vue/no-parsing-error的问题

What is actually happening?

error Parsing error: x-invalid-end-tag vue/no-parsing-error

Most helpful comment

来自:vs code 里面 如何 去掉 invalid-end-tag 的lint错误
//settings 里面的配置:
"vetur.validation.template": false

All 17 comments

Translation of this issue:

Environment

Vue 2.5.13/eslint-plugin-vue 4.0.0

Reproduction link

https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/no-parsing-error.md

Steps to reproduce

Eslint-plugin-vue is the official version of the code that runs the following code under the configuration of eslint
.



.
Eslint check the mistake
.
3:7 error Parsing error: x-invalid-end-tag vue/no-parsing-error
.

What is expected?

Because col is a self closing tag, I hope there is an effective way to solve the problem of vue/no-parsing-error

What is actually happening?

Error Parsing error: x-invalid-end-tag vue/no-parsing-error

The linter thinks its the HTML native <col> which is a empty element. Did you try using i-col in your template?

you can use i-col

https://github.com/vuejs/vetur/blob/master/docs/linting-error.md#linting-for-template

可以单独关闭标签检查,现在舒服多了~

I have the same problem.
image
image

I have set vue/no-parsing-error, but it's not useful. So how to do next?

.eslintrc.js 的 rules 加上
"vue/no-parsing-error": [2, { "x-invalid-end-tag": false }]

来自:vs code 里面 如何 去掉 invalid-end-tag 的lint错误
//settings 里面的配置:
"vetur.validation.template": false

@hua-cyh niubility,thanks!

@hua-cyh 厉害了……

webstorm 里面怎么搞啊,, 设置了"vue/no-parsing-error": [2, { "x-invalid-end-tag": false }]
编译没报错,,, 但是特么编辑器还是报错,心塞

webstorm设置"vue/no-parsing-error": [2, { "x-invalid-end-tag": false }]没问题啊,得重启编译dev才能生效的

@hua-cyh thx!

设置了"vue/no-parsing-error": [2, { "x-invalid-end-tag": false }]之后不得行,在VSCode设置"vetur.validation.template": false还是不得行。编译没有报错, 但是vscode编译器老报错,看着我很难受啊,怎么解决?

设置了"vue/no-parsing-error": [2, { "x-invalid-end-tag": false }]之后不得行,在VSCode设置"vetur.validation.template": false还是不得行。编译没有报错, 但是vscode编译器老报错,看着我很难受啊,怎么解决?

设置完vscode 需要重启一次vscode 试试。 我这里设置完不生效,重启后生效了。

I'm getting a similar error

screen shot 2019-02-21 at 8 08 31 am

I added "vetur.validation.template": false, to my settings.json

And added custom rules to eslintrc.js

  rules: {
    "vue/no-parsing-error": [2, {
      "x-invalid-end-tag": false
    }]
  }

Nothing seems to be working....

@ghost 重启vscode即可

webstorm 里面怎么搞啊,, 设置了"vue/no-parsing-error": [2, { "x-invalid-end-tag": false }]
编译没报错,,, 但是特么编辑器还是报错,心塞

重启就没事了

Was this page helpful?
0 / 5 - 0 ratings