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

ts 版本缺乏 lint #2268

Closed
shaodahong opened this issue Feb 26, 2019 · 5 comments
Closed

ts 版本缺乏 lint #2268

shaodahong opened this issue Feb 26, 2019 · 5 comments
Assignees

Comments

@shaodahong
Copy link

shaodahong commented Feb 26, 2019

使用 cli 生成项目选的 ts 模板,使用 eslint src/ --ext .tsx 后发现项目对 ts 的 lint 检查不起作用

  30:23  error  Unexpected usage of doublequote  jsx-quotes
  32:16  error  Unexpected usage of doublequote  jsx-quotes
  33:16  error  Unexpected usage of doublequote  jsx-quotes
  34:23  error  Unexpected usage of doublequote  jsx-quotes
  38:21  error  Unexpected usage of doublequote  jsx-quotes
  39:28  error  Unexpected usage of doublequote  jsx-quotes
  43:16  error  Unexpected usage of doublequote  jsx-quotes
  44:16  error  Unexpected usage of doublequote  jsx-quotes
  45:23  error  Unexpected usage of doublequote  jsx-quotes
  49:21  error  Unexpected usage of doublequote  jsx-quotes
  50:28  error  Unexpected usage of doublequote  jsx-quotes
  51:21  error  Unexpected usage of doublequote  jsx-quotes
  53:31  error  Unexpected usage of doublequote  jsx-quotes
  57:21  error  Unexpected usage of doublequote  jsx-quotes
  65:25  error  Unexpected usage of doublequote  jsx-quotes
  67:27  error  Unexpected usage of doublequote  jsx-quotes

ts 的写法是没有问题的,但是 eslint 报错了,是不是应该使用 tslint

@taro-bot
Copy link

taro-bot bot commented Feb 26, 2019

欢迎提交 Issue~

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

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

Good luck and happy coding~

@fjc0k
Copy link
Contributor

fjc0k commented Feb 26, 2019

@shaodahong
Copy link
Author

@fjc0k 你这个是 ts 的 eslint 改造分支吧

@fjc0k
Copy link
Contributor

fjc0k commented Feb 28, 2019

@shaodahong 现在 TypeScript 官方都开始推荐用 eslint 了,你可以用用看。tslint 支持的基本都支持,不支持的也支持。

@shaodahong
Copy link
Author

https://github.com/NervJS/taro-v2ex 恩,我看这个项目也是用的 eslint 来检查,我 clone 下来也是报错

2019-02-28 19 39 03

@yuche yuche self-assigned this Apr 8, 2019
@yuche yuche closed this as completed in f2ff739 Apr 9, 2019
leidenglai added a commit to leidenglai/taro that referenced this issue Apr 10, 2019
* upstream/master: (166 commits)
  docs: fix doc error as issue NervJS#2543 (NervJS#2714)
  feat(components): 完善 Input, Button, Textarea, WebView, Swiper 组件的类型定义 (NervJS#2713)
  feat(taro-components): 更新 Video 组件的类型定义
  chore(taro-components): CommonEventFunction 支持传入 e.detail 的类型
  refactor(transformer): 测试环境也需要提醒无法使用 index 作为 key
  test(transformer): 增加使用 index 作为 key 的测试用例,  NervJS#2706
  feat(transformer): 支持 export * from * 语法, close NervJS#959 export v from 'mod' 会转换为两行代码: import v from 'mod' export {  v }
  feat(transformer): 支持 do expression,close NervJS#2589
  refactor(cli): 在 ts 模板中更换 eslint parser, close NervJS#2268
  fix(taro-cli): 更新微信小程序插件模板
  fix(transformer): 只有 props 为 key 时才进行 key 不得为 index 的警告 (NervJS#2705)
  chore(components): ci问题修复
  refactor(transformer): 对头条小程序的循环 ref 进行特殊处理
  chore(webpack-runner): 固定webpack-runner的依赖版本
  feat(h5): h5支持PullDownRefresh系列api
  feat(components): h5内置PullDownRefresh组件
  fix(taro-cli): 修复 taro init 插件模板
  test(transformer): 增加 typescript 测试用例,  NervJS#2699
  refactor(transformer):  只有 .tsx 才保留 JSX 声明,NervJS#2699
  fix(taro-tt): 修复字节跳动小程序循环 ref
  ...

# Conflicts:
#	packages/taro-cli/templates/mobx/globaldts
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