.eslintrc.json 8.32 KB
{
  "extends": "eslint:recommended",
  "env": {
    "node": true,
    "es6": false,
    "browser": false
  },
  "parserOptions": {
    "sourceType": "module",
    "ecmaFeatures": {
      "modules": true
    }
  },
  "plugins": [
  ],
  "rules": {
    "curly": [2, "multi-line"],
    "camelcase": [1, {
      "properties": "never"
    }],
    "require-jsdoc": 0,
    "valid-jsdoc": 0,
    "valid-typeof": 2,
    "no-array-constructor": 2,
    "no-bitwise": 2,
    "no-buffer-constructor": 0,
    "no-caller": 1,
    "no-catch-shadow": 2,
    "no-class-assign": 2,
    "no-compare-neg-zero": 2,
    "no-cond-assign": 2,
    "no-confusing-arrow": 2,
    "no-console": [1, {
      "allow": ["info", "warn", "error"]
    }],
    "no-const-assign": 2,
    "no-constant-condition": 2,
    "no-control-regex": 2,
    "no-debugger": 2,
    "no-delete-var": 2,
    "no-dupe-args": 2,
    "no-dupe-class-members": 2,
    "no-dupe-keys": 2,
    "no-duplicate-case": 2,
    "no-duplicate-imports": 2,
    "no-else-return": [2, {
      "allowElseIf": false
    }],
    "no-empty": [1, {
      "allowEmptyCatch": true
    }],
    "no-empty-character-class": 2,
    "no-eq-null": 2,
    "no-eval": 2,
    "no-ex-assign": 2,
    "no-extend-native": 2,
    "no-extra-bind": 1,
    "no-extra-boolean-cast": 2,
    "no-extra-parens": [0, "all", {
      "returnAssign": false,
      "nestedBinaryExpressions": false
    }],
    "no-extra-semi": 2,
    "no-fallthrough": 2,
    "no-floating-decimal": 2,
    "no-func-assign": 2,
    "no-global-assign": 2,
    "no-implicit-coercion": 2,
    "no-implied-eval": 2,
    "no-inner-declarations": 1,
    "no-invalid-regexp": 2,
    "no-invalid-this": 2,
    "no-irregular-whitespace": 2,
    "no-labels": 2,
    "no-lonely-if": 1,
    "no-loop-func": 0,
    "no-multi-assign": 1,
    "no-multi-str": 1,
    "no-multiple-empty-lines": [1, {"max": 2}],
    "no-nested-ternary": 2,
    "no-new": 1,
    "no-new-func": 2,
    "no-new-require": 2,
    "no-new-wrappers": 1,
    "no-obj-calls": 2,
    "no-octal": 2,
    "no-octal-escape": 2,
    "no-param-reassign": 0,
    "no-path-concat": 2,
    "no-process-env": 0,
    "no-proto": 2,
    "no-redeclare": 2,
    "no-regex-spaces": 1,
    "no-return-assign": 2,
    "no-self-compare": 1,
    "no-self-assign": [2, {
      "props": true
    }],
    "no-sequences": 2,
    "no-shadow-restricted-names": 2,
    "no-sparse-arrays": 2,
    "no-this-before-super": 2,
    "no-tabs": 2,
    "no-throw-literal": 2,
    "prefer-promise-reject-errors": 2,
    "no-template-curly-in-string": 1,
    "no-undef": 2,
    "no-undef-init": 2,
    "no-undefined": 2,
    "no-unexpected-multiline": 2,
    "no-unneeded-ternary": 2,
    "no-unreachable": 1,
    "no-unsafe-negation": 2,
    "no-unused-expressions": 1,
    "no-unused-vars": [2, {
      "vars": "all",
      "args": "none",
      "caughtErrors": "none",
      "ignoreRestSiblings": true
    }],
    "no-use-before-define": 2,
    "no-useless-call": 2,
    "no-useless-concat": 1,
    "no-useless-escape": 0,
    "no-void": 2,
    "no-with": 2,
    "no-return-await": 1,
    "no-await-in-loop": 2,
    "nonblock-statement-body-position": [2, "beside"],
    "use-isnan": 2,
    "accessor-pairs": 2,
    "block-scoped-var": 2,
    "func-name-matching": [2, {
      "includeCommonJSModuleExports": true
    }],
    "func-call-spacing": [2, "never"],
    "consistent-return": [2, {
      "treatUndefinedAsUnspecified": true
    }],
    "linebreak-style": [0, "unix"],
    "new-cap": 2,
    "new-parens": 2,
    "newline-after-var": [0, "always"],
    "generator-star-spacing": [2, {
      "before": true,
      "after": false
    }],
    "complexity": [2, 20],
    "lines-around-directive": 1,
    "dot-notation": 1,
    "guard-for-in": 1,
    "for-direction": 2,
    "require-await": 2,
    "require-yield": 2,
    "arrow-parens": [2, "always", {
      "requireForBlockBody": true
    }],
    "arrow-spacing": 2,
    "callback-return": [1, [
      "callback", "cb", "next", "done"
    ]],
    "getter-return": 2,
    "operator-linebreak": [1, "before", {
      "overrides": {
        "&&": "after",
        "||": "after"
      }
    }],
    "wrap-iife": [2, "inside", {
      "functionPrototypeMethods": true
    }],
    "function-paren-newline": 0,
    "yoda": 2,
    "prefer-arrow-callback": 0,
    "prefer-template": 0,
    "prefer-const": 0,
    "prefer-destructuring": 0,
    "prefer-spread": 0,
    "prefer-numeric-literals": 1,
    "rest-spread-spacing": 0,
    "constructor-super": 2,
    "template-tag-spacing": 2,
    "default-case": 1,
    "sort-keys": 0,
    "vars-on-top": 0,
    "eqeqeq": [2, "always", {
      "null": "always"
    }],
    "radix": 2,
    "consistent-this": [2, "_this"],
    "eol-last": 2,
    "func-style": 0,
    "jsx-quotes": [2, "prefer-double"],
    "semi": [2, "always"],
    "semi-spacing": [2, {
      "before": false,
      "after": true
    }],
    "one-var": [2, "never"],
    "quote-props": [2, "as-needed"],
    "init-declarations": [2, "always"],
    "computed-property-spacing": [2, "never"],
    "no-underscore-dangle": [2, {
      "allowAfterThis": true,
      "allowAfterSuper": true,
      "allow": [
        "_this",
        "_root", "_documentInfo", "_html", "_text",
        "_originalRoot", "_traceRoute", "_$"
      ]
    }],
    "comma-dangle": [2, "never"],
    "comma-style": [2, "last"],
    "brace-style": [1, "1tbs", {
      "allowSingleLine": true
    }],
    "no-mixed-spaces-and-tabs": [2, "smart-tabs"],
    "no-mixed-operators": [2, {
      "groups": [
        ["+", "-", "*", "/", "%", "**"],
        ["&", "|", "^", "~", "<<", ">>", ">>>"],
        ["==", "!=", "===", "!==", ">", ">=", "<", "<="],
        ["&&", "||"],
        ["in", "instanceof"]
      ],
      "allowSamePrecedence": true
    }],
    "indent": [2, 2, {
        "SwitchCase": 1,
        "ImportDeclaration": "first",
        "MemberExpression": 0,
        "CallExpression": {
          "arguments": "first"
        },
        "FunctionDeclaration": {
          "parameters": "first",
          "body": 1
        }
      }
    ],
    "keyword-spacing": [2, {
      "before": true,
      "after": true,
      "overrides": {}
    }],
    "lines-between-class-members": [2, "always"],
    "lines-around-comment": [2, {
      "beforeBlockComment": true,
      "afterBlockComment": false,
      "beforeLineComment": false,
      "afterLineComment": false,
      "allowBlockStart": true,
      "allowBlockEnd": true,
      "allowObjectStart": true,
      "allowObjectEnd": true,
      "allowArrayStart": true,
      "allowArrayEnd": true
    }],
    "space-before-blocks": [2, "always"],
    "space-before-function-paren": [2, {
      "named": "never",
      "asyncArrow": "always"
    }],
    "space-in-parens": [2, "never"],
    "space-infix-ops": 2,
    "space-unary-ops": [2, {
      "words": true,
      "nonwords": false,
      "overrides": {
        "!": true,
        "!!": true
      }
    }],
    "semi-style": [2, "last"],
    "switch-colon-spacing": 2,
    "multiline-ternary": [2, "always-multiline"],
    "object-curly-spacing": [2, "always", {
      "objectsInObjects": false,
      "arraysInObjects": false
    }],
    "object-curly-newline": [0, {
      "ObjectExpression": "always",
      "ObjectPattern": {"multiline": true}
    }],
    "object-property-newline": 0,
    "no-trailing-spaces": [2, {
      "skipBlankLines": false
    }],
    "object-shorthand": [1, "consistent"],
    "key-spacing": [2, {
      "beforeColon": false,
      "afterColon": true
    }],
    "comma-spacing": [2, {
      "before": false,
      "after": true
    }],
    "no-multi-spaces": [2, {
      "ignoreEOLComments": true,
      "exceptions": {
        "ImportDeclaration": true,
        "VariableDeclarator": true,
        "Property": true
      }
    }],
    "array-bracket-spacing": [2, "always", {
      "singleValue": true,
      "objectsInArrays": false,
      "arraysInArrays": true
    }],
    "array-bracket-newline": [2, "consistent"],
    "quotes": [1,
      "single", "avoid-escape"
    ],
    "max-statements-per-line": [1, { "max": 1 }],
    "max-len": [1, {
      "code": 100,
      "tabWidth": 2,
      "ignoreComments": true,
      "ignoreTrailingComments": true,
      "ignoreUrls": true,
      "ignoreStrings": true,
      "ignoreTemplateLiterals": true,
      "ignoreRegExpLiterals": true
    }],
    "max-lines": [1, 2000],
    "max-params": [1, 5],
    "max-depth": [1, 4],
    "max-nested-callbacks": [1, 5],
    "max-statements": [1, 30]
  }
}