# admin-H-Integral **Repository Path**: null_924_4783/admin-H-Integral ## Basic Information - **Project Name**: admin-H-Integral - **Description**: H积分后台管理系统 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-09-17 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #
H积分后台管理系统
* **eslint 相关配置** 安装插件:eslint,babel-eslint,eslint-plugin-react,eslint-plugin-alloy *rules中的值0、1、2分别表示不开启检查、警告、错误* react项目中package.json里有eslint的相关配置,把配置写在package.json-eslintConfig 里即可
"eslintConfig": {
    "parser": "babel-eslint",
    "extends": "eslint-config-alloy/react",
    "env": {
      "browser": true,
      "node": true,
      "mocha": true,
      "es6": true
    },
    "plugins": [
      "react"
    ],
    "parserOptions": {
      "ecmaVersion": 6,
      "sourceType": "module",
      "ecmaFeatures": {
        "jsx": true
      }
    },
    "rules": {
      "no-unused-vars": 0, // 不限制未使用变量
      "no-irregular-whitespace": 2, // // 不允许不规则的空白
      "no-trailing-spaces": 2, // 一行结束后面不允许有空格
      "indent": [ // 一个缩进必须用两个空格替代
        "error",
        2,
        {
          "SwitchCase": 1,
          "flatTernaryExpressions": true
        }
      ],
      "react/jsx-indent": [ // jsx 的 children 缩进必须为两个空格
          "error",
          2
      ],
      "react/jsx-indent-props": [ // jsx 的 props 缩进必须为两个空格
          "error",
          2
      ]
    }
  },
  
参考: > https://www.cnblogs.com/Hsong/p/9023341.html > https://www.jb51.net/article/134474.htm