Ecmascript 6 导入的ESLint规则错误
我通过eslint得到以下错误 我还在Ecmascript 6 导入的ESLint规则错误,ecmascript-6,atom-editor,eslint,Ecmascript 6,Atom Editor,Eslint,我通过eslint得到以下错误 我还在.eslintrc文件中添加了ecmaFeatures:{“modules”:true} 因为您收到了这条信息,看起来您已经升级到了ESLint 2.0,这太棒了!我可以看到您将对配置进行的两项更改,但如果出现任何其他更改,可能会在以下内容中介绍: 在2.0中,“ecmaFeatures”:{“modules”:true}已成为“parserOptions”:{“sourceType”:“module”} 我们用一个新规则替换了它,该规则是在2.0测试版中引
.eslintrc
文件中添加了ecmaFeatures:{“modules”:true}
因为您收到了这条信息,看起来您已经升级到了ESLint 2.0,这太棒了!我可以看到您将对配置进行的两项更改,但如果出现任何其他更改,可能会在以下内容中介绍:
“ecmaFeatures”:{“modules”:true}
已成为“parserOptions”:{“sourceType”:“module”}
“空格”,现在可以将其更改为“关键字间距”:2
.eslintrc
应该包括以下内容:
{
"parserOptions": {
"sourceType": "module"
},
"env": {
"es6": true
},
"rules": {
"keyword-spacing": 2
}
}