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

eslint版本>8后报错,eslint-config-taro用了废弃的 babel-eslint #11447

Closed
soibhanZhangxb opened this issue Mar 14, 2022 · 5 comments · Fixed by #11540
Closed

eslint版本>8后报错,eslint-config-taro用了废弃的 babel-eslint #11447

soibhanZhangxb opened this issue Mar 14, 2022 · 5 comments · Fixed by #11540
Labels
enhancement New feature or request T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Milestone

Comments

@soibhanZhangxb
Copy link

相关平台

微信小程序

小程序基础库: 2.32.0
使用框架: Vue 3

复现步骤

  1. package.json 载入 eslint-config-taro 和 eslint
  2. eslint版本大于8会报错 ESLint: Parsing error: require() of ES Module 。。。。
    是由于eslint-config-taro 中的babel-eslint已经废弃,已被替代为 @babel/eslint-parser

期望结果

可以使用新版本的 eslint

实际结果

版本冲突

环境信息

Taro v3.4.3


  Taro CLI 3.4.3 environment info:
    System:
      OS: macOS High Sierra 10.13.6
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 16.14.0 - /usr/local/bin/node
      Yarn: 1.22.17 - /usr/local/bin/yarn
      npm: 8.5.3 - /usr/local/bin/npm
    npmPackages:
      @tarojs/components: 3.4.3 => 3.4.3 
      @tarojs/mini-runner: 3.4.3 => 3.4.3 
      @tarojs/runtime: 3.4.3 => 3.4.3 
      @tarojs/taro: 3.4.3 => 3.4.3 
      @tarojs/webpack-runner: 3.4.3 => 3.4.3 
      babel-preset-taro: 3.4.3 => 3.4.3 
      eslint-config-taro: 3.4.3 => 3.4.3 

补充信息

eslint-config-taro 中的babel-eslint已经废弃,已被替代为 @babel/eslint-parser

@github-actions
Copy link
Contributor

@Chen-jj
Copy link
Contributor

Chen-jj commented Mar 14, 2022

来个 PR 咯~

@ickg5
Copy link
Contributor

ickg5 commented Mar 15, 2022

希望能升级一下 eslint 的版本

@ZakaryCode ZakaryCode added enhancement New feature or request A-eslint V-3 Version - 3.x T-weapp Target - 编译到微信小程序 labels Mar 15, 2022
@kabutoa
Copy link

kabutoa commented Mar 15, 2022

遇到同样的问题

@Mou2xie
Copy link

Mou2xie commented Mar 16, 2022

我也遇到这个问题,官方的云开发模板+使用ts的场景下,编译不了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants