javascript - 如何在 Yeoman web 应用程序中配置 eslint?

标签 javascript node.js yeoman

我在 Yeoman webapp 文件夹中找不到要编辑的正确 .eslintrc。 我想使用双引号而不是单引号。 我还尝试在我的主文件夹中添加 .eslintrc 但没有成功。 谢谢。

最佳答案

好吧,我终于找到了。您必须编辑 Yeoman Web 应用程序根目录中 package.jsoneslintConfig 部分。 谢谢你。

package.json 片段:

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

关于javascript - 如何在 Yeoman web 应用程序中配置 eslint?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36046223/

相关文章:

javascript - Node.js : request js multipart 2nd level file and JSON. 字符串化

node.js - Sequelize + Sequelize cli 播种大量随机数据

javascript - 尝试获取 span 元素的内部文本内容

node.js - 部署 create-react-app - 静态还是动态?

javascript - 从外部检测 iframe 内的点击?

javascript - grunt-bower-install 将 bower_components 链接到当前目录

javascript - Grunt 运行并完成 "watch"任务后非常慢

javascript - AngularJS 指令范围似乎只接受一个参数

javascript - jqGrid - 有没有 "grid edit mode"?

javascript - 从/到 Javascript 字符串从 Go int64/uint64 序列化反序列化