eslint配置

{
  "extends": "eslint-config-egg",
  "rules": {
    /*
      0 或’off’:  关闭规则。
      1 或’warn’: 打开规则,并且作为一个警告,字体颜色为黄色(并不会导致检查不通过)。
      2 或’error’:打开规则,并且作为一个错误 ,色体颜色为红色(退出码为1,检查不通过)。
    */
    "strict": [2, "global"], // 严格模式global不报错
    // allow async-await
    "generator-star-spacing": "off", //
    "no-tabs": "off",
    "no-unused-vars": "off", // 声明未使用,不报错
    "no-console": "off", // console语句不报错
    "no-irregular-whitespace": "off",
    "no-debugger": "off",
    "quotes": [1, "single"] // 引号类型 `` "" ''
  }
}

  

posted @ 2021-07-05 14:51  sinceForever  阅读(167)  评论(0编辑  收藏  举报