如何在 Yeoman webapp 中配置 eslint?

How can I configure eslint in Yeoman webapp?

我在我的 Yeoman webapp 文件夹中找不到合适的 .eslintrc 进行编辑。 我想用双引号代替单引号。 我也尝试在我的主文件夹中添加 .eslintrc 但没有成功。 谢谢。

好的,我终于找到了。您必须在 Yeoman webapp 的根目录中编辑 package.jsoneslintConfig 部分。 谢谢你。

package.json 的片段:

 "eslintConfig": {
    "env": {
      "es6": true,
      "node": true,
      "browser": true
    },
    "rules": {
      "quotes": [
        2,
        "single"
      ]
    }
  }