thewindsword
4/23/2019 - 4:04 AM

代码规范

{
  "extends": ["airbnb", "prettier", "prettier/react"],
  "parser": "babel-eslint",
  "plugins": ["prettier"],
  "rules": {
    "react/jsx-filename-extension": 0,
    "react/forbid-prop-types": 0,
    "camelcase": 0,
    "class-methods-use-this": 0,
    "jsx-a11y/label-has-for": 0,
    "no-script-url": 0,
    "linebreak-style": 0,
    "react/jsx-indent": 0,
    "no-debugger": 0,
    "react/jsx-closing-tag-location": 0,
    "jsx-a11y/href-no-hash": "off",
    "jsx-a11y/anchor-is-valid": [
      "warn",
      {
        "aspects": [
          "invalidHref"
        ]
      }
    ],
    "jsx-a11y/click-events-have-key-events": 0,
    "jsx-a11y/no-static-element-interactions": 0,
    "global-require": 0,
    "object-curly-spacing": 0,
    "block-spacing": 0,
    "arrow-parens": 0,
    "react/no-find-dom-node": 0,
    "react/prop-types": 0,
    "no-trailing-spaces": 0,
    "import/prefer-default-export": 0,
    "consistent-return": 0,
    "no-control-regex": 0,
    "prettier/prettier": "error"
  },
  "globals": {
    "window": true,
    "FormData": true,
    "FileReader": true,
    "document": true,
    "Blob": true,
    "WebSocket": true
  }
}