We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
问题描述
我的config/index.js中, 插件transform-decorators-legacy并没有关闭:
config/index.js
transform-decorators-legacy
plugins: { babel: { sourceMap: true, presets: [ 'env' ], plugins: [ 'transform-decorators-legacy', 'transform-class-properties', 'transform-object-rest-spread' ] } },
但是执行ESLint时, 遇到报错:
D:\@github\twt\src\pages\packages\play\pages\game\index.js 18:1 error Parsing error: Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead. 16 | @inject('appStore') 17 | @observer > 18 | export default class PreparePage extends Component { | ^ 19 | 20 | config = { 21 | navigationStyle: 'custom' ✖ 2 problems (2 errors, 0 warnings)
Taro 版本:
👽 Taro v1.2.23 Taro CLI 1.2.23 environment info: System: OS: Windows 10 Binaries: Node: 10.15.3 - C:\nodejs\node.EXE Yarn: 1.13.0 - C:\Users\18062\AppData\Roaming\npm\yarn.CMD npm: 6.9.1-next.0 - C:\nodejs\npm.CMD
The text was updated successfully, but these errors were encountered:
欢迎提交 Issue~
如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏
如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。
Good luck and happy coding~
Sorry, something went wrong.
升级依赖 babel-eslint 到 9.0.0 , 并在 .eslintrc 文件中配置parserOptions.ecmaFeatures.legacyDecorators 可以解决这个问题
babel-eslint
9.0.0
.eslintrc
parserOptions.ecmaFeatures.legacyDecorators
请参考: https://github.com/babel/babel-eslint/releases/tag/v9.0.0
No branches or pull requests
问题描述
我的
config/index.js
中, 插件transform-decorators-legacy
并没有关闭:但是执行ESLint时, 遇到报错:
Taro 版本:
The text was updated successfully, but these errors were encountered: