Skip to content

vuecli3 slot-scope写法 eslint不通过 #301

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
724493602 opened this issue Dec 12, 2018 · 10 comments
Closed

vuecli3 slot-scope写法 eslint不通过 #301

724493602 opened this issue Dec 12, 2018 · 10 comments
Labels

Comments

@724493602
Copy link

724493602 commented Dec 12, 2018

  <span slot="action" slot-scope="x, y">
          <a href="javascript:;">Invite 一 {{ y.id }}</a>
   </span>

eslint报错:
error: Parsing error: Unexpected token ',' (vue/no-parsing-error)

@tangjinzhou
Copy link
Member

ref vuejs/eslint-plugin-vue#722

@vxhly
Copy link
Contributor

vxhly commented Jan 9, 2019

<span slot="action" slot-scope="{x,y}">
          <a href="javascript:;">Invite 一 {{ y.id }}</a>
   </span>

好像这么写就不会报错,但是,下面的不认。。

@hedanto
Copy link

hedanto commented Jan 22, 2019

目前有解决方案?

@tangjinzhou
Copy link
Member

tangjinzhou commented Jan 22, 2019

<span slot="action" slot-scope="{x,y}">
          <a href="javascript:;">Invite 一 {{ y.id }}</a>
   </span>

好像这么写就不会报错,但是,下面的不认。。

@vxhly 你这么写是不对的

@tangjinzhou
Copy link
Member

目前有解决方案?

@hedanto 关注这个issue,vuejs/eslint-plugin-vue#722 官方已经在解决了,等待发布状态

暂时先把这个lint规则关掉,不影响使用

@mcdnf
Copy link

mcdnf commented Feb 18, 2019

目前有解决方案?

@hedanto 关注这个issue,vuejs/eslint-plugin-vue#722 官方已经在解决了,等待发布状态

暂时先把这个lint规则关掉,不影响使用

这条规则怎么关闭?
image
这样还是会报
image

@tangjinzhou
Copy link
Member

ref vuejs/vetur#1117

@tangjinzhou
Copy link
Member

vuejs/eslint-plugin-vue已经解决,使用vscode的用户依然会有红线报错,那是vetur插件的问题,不影响打包和lint校验,耐心等待插件更新

@tangjinzhou
Copy link
Member

vscode设置
"vetur.validation.template": false,
关掉vetur的lint校验

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants