gpt4 book ai didi

babeljs - Atom 和 eslint 更新 : ImportDeclaration should appear when the mode is ES6 and in the module context

转载 作者:行者123 更新时间:2023-12-05 03:11:52 25 4
gpt4 key购买 nike

我更新了我所有的包,现在我使用 eslint 2.4.0 和 babel-eslint 5.0.0。

但是现在,我在 eslint 检查时遇到错误:

AssertionError: ImportDeclaration should appear when the mode is ES6 and in the module context.

我的 .eslintrc 是:

{
"ecmaFeatures": {
"jsx": true,
"modules": true
},
"env": {
"browser": true,
"node": true
},
"parser": "babel-eslint",
"rules": {
"quotes": [2, "single"],
"strict": [2, "never"],
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
"react/react-in-jsx-scope": 2
},
"plugins": [
"react"
]
}

不兼容?重大变化?

谢谢

最佳答案

编辑:

错误现在是fixed .您可以安全地使用 "eslint": "^2.4.0"


有一个know issue关于那个(here too)。

我建议您暂时使用 2.2.x 版本。

关于babeljs - Atom 和 eslint 更新 : ImportDeclaration should appear when the mode is ES6 and in the module context,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35956821/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com