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

字符串属性赋值字符串变量时会误报taro/jsx-handler-names警告 #1295

Closed
tiancheng2000 opened this issue Nov 29, 2018 · 4 comments

Comments

@tiancheng2000
Copy link
Contributor

tiancheng2000 commented Nov 29, 2018

问题描述

JSX中,对属性赋值字符串变量时会误报taro/jsx-handler-names警告

复现步骤

  1. 在Page中定义成员变量/常量config,内含字符串变量innerNavBarTitle
  2. 在或JSX中赋值给valueleftText等,就会提示需以on命名(taro/jsx-handler-names)
  3. 如果先赋值给一个局部变量如innerNavBarTitle后,再用该变量给title等赋值,就不会出ESLint警告
  4. 实际运行效果并不受影响(h5, weapp)
    image

期望行为

不要误报

报错信息

taro/jsx-handler-names

系统信息

Node 10.9,Taro 1.1.3,h5+weapp

@taro-bot
Copy link

taro-bot bot commented Nov 29, 2018

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@luckyadam
Copy link
Member

升级到最新版本试试

@tiancheng2000
Copy link
Contributor Author

好…我们这边代理管得较严(加上npm没问题、但Yarn的设置好像一直有问题),taro update project 要靠手工改package.json来做😂 下次升级时试一试🙏

@luckyadam
Copy link
Member

好嘞

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

No branches or pull requests

3 participants