{
  "root": true,
  "parser": "babel-eslint",//解析器，这里我们使用babel-eslint
  "parserOptions": {
    "sourceType": "module"
    //类型为module，因为代码使用了使用了ECMAScript模块
  },
  "env": {
    "browser": true //预定义的全局变量，这里是浏览器环境
  },
  "extends": "eslint-config-egg", //扩展，可以通过字符串或者一个数组来扩展规则
  // required to lint *.vue files
  // add your custom rules here
  "rules": {
    //这里写自定义规则
    "indent": [2, 2], //缩进风格
    "no-multiple-empty-lines": [1, {"max": 2}], //空行最多不能超过2行
    "camelcase": 2, //强制驼峰法命名
    "init-declarations": 0, //声明时必须赋初值
    "space-before-function-paren": [2, "always"], //函数定义时括号前面要不要有空格
    "no-spaced-func": 2, //函数调用时 函数名与()之间不能有空格
    "no-undef": 2, //不能有未定义的变量
    "no-redeclare": 2, //禁止重复声明变量
    "eqeqeq": [2, "allow-null"], // 使用 === 替代 ==
    "quotes": [ 2, "double"], // 使用双引号
    "semi": [2, "never"] // 不使用分号
  }
}
