标签: jsxhint

如何在Atom中设置jshint/jsxhint"esnext"选项

我使用Atom的linter,reactlinter-jshint/ linter-jsxhint.在我的JSX文件中,我不断收到警告

警告:'import'仅在ES6中可用(使用esnext选项).(W119)

这非常简单.我做了一些搜索,发现这可以在jshintConfig选项中设置package.json(使用NPM时).我的项目使用NPM,我有一个package.json.我补充说:

"jshintConfig": {
  "esnext": true
}
Run Code Online (Sandbox Code Playgroud)

之后,我做了重装,但警告仍然存在.我还修改了Atom()中的linter-jshint/ linter-jsxhintconfig config.cson:

"linter-jshint":
  harmony: true
  esnext: true

"linter-jsxhint":
  harmony: true
  esnext: true
Run Code Online (Sandbox Code Playgroud)

并做了重装,但也没有帮助.

那么:当使用linter-jshint/ linter-jsxhint作为Atom包时,如何设置esnext选项?

jshint atom-editor jsxhint

34
推荐指数
3
解决办法
2万
查看次数

标签 统计

atom-editor ×1

jshint ×1

jsxhint ×1