{ "env": { "es6": true, "node": true }, "globals": { "Promise": true }, "rules": { "no-console": [ "error" ], "no-constant-condition": [ "error", { "checkLoops": false } ], "no-debugger": [ "error" ], "no-dupe-args": [ "error" ], "no-dupe-keys": [ "error" ], "no-duplicate-case": [ "error" ], "no-empty-character-class": [ "error" ], "no-empty": [ "error", { "allowEmptyCatch": true } ], "no-ex-assign": [ "error" ], "no-extra-boolean-cast": [ "error" ], "no-extra-semi": [ "error" ], "no-func-assign": [ "error" ], "no-inner-declarations": [ "error", "both" ], "no-invalid-regexp": [ "error", { "allowConstructorFlags": [ "u", "y" ] } ], "no-irregular-whitespace": [ "error" ], "no-negated-in-lhs": [ "error" ], "no-obj-calls": [ "error" ], "no-prototype-builtins": [ "error" ], "no-regex-spaces": [ "error" ], "no-sparse-arrays": [ "error" ], "no-unexpected-multiline": [ "error" ], "no-unreachable": [ "error" ], "use-isnan": [ "error" ], "valid-typeof": [ "error" ], /* Best Practices: */ "accessor-pairs": [ "error" ], "array-callback-return": [ "error" ], "block-scoped-var": [ "error" ], "complexity": [ "error", 20 ], "default-case": [ "error" ], "dot-location": [ "error", "property" ], "dot-notation": [ "error" ], "eqeqeq": [ "error" ], "guard-for-in": [ "error" ], "no-alert": [ "error" ], "no-caller": [ "error" ], "no-case-declarations": [ "error" ], "no-div-regex": [ "error" ], "no-empty-function": [ "off" ], "no-empty-pattern": [ "error" ], "no-eq-null": [ "error" ], "no-eval": [ "error" ], "no-extend-native": [ "error" ], "no-extra-bind": [ "error" ], "no-extra-label": [ "error" ], "no-fallthrough": [ "error" ], "no-floating-decimal": [ "error" ], "no-implicit-coercion": [ "error", { "boolean": true, "string": true, "number": true, "allow": [ "!!" ] } ], "no-implicit-globals": [ "error" ], "no-implied-eval": [ "error" ], "no-invalid-this": [ "off" // because of koa =/ ], "no-iterator": [ "error" ], "no-labels": [ "error" ], "no-lone-blocks": [ "off" ], "no-loop-func": [ "off" ], "no-multi-spaces": [ "error" ], "no-multi-str": [ "error" ], "no-native-reassign": [ "error" ], "no-new-func": [ "error" ], "no-new-wrappers": [ "error" ], "no-new": [ "error" ], "no-octal-escape": [ "error" ], "no-octal": [ "error" ], "no-param-reassign": [ "off" // :'( ], "no-proto": [ "error" ], "no-redeclare": [ "error" ], "no-script-url": [ "error" ], "no-self-assign": [ "error" ], "no-self-compare": [ "error" ], "no-sequences": [ "error" ], "no-throw-literal": [ "error" ], "no-unmodified-loop-condition": [ "error" ], "no-unused-labels": [ "error" ], "no-useless-call": [ "error" ], "no-useless-concat": [ "error" ], "no-void": [ "error" ], "no-with": [ "error" ], "radix": [ "off" ], "vars-on-top": [ "error" ], "wrap-iife": [ "error" ], "yoda": [ "error" ], /* Strict Mode: */ "strict": [ "error", "global" ], /* Variables: */ "init-declarations": [ "off" ], "no-catch-shadow": [ "error" ], "no-delete-var": [ "error" ], "no-label-var": [ "error" ], "no-restricted-globals": [ "off" ], "no-shadow-restricted-names": [ "error" ], "no-shadow": [ "off" ], "no-undef-init": [ "error" ], "no-undef": [ "error" ], "no-undefined": [ "off" ], "no-unused-vars": [ "error", { "vars": "local", "args": "none" } ], "no-use-before-define": [ "error" ], /* Node.js and CommonJS: */ "callback-return": [ "error", [ "callback", "cb", "next", "done" ] ], "global-require": [ "off" ], "handle-callback-err": [ "error" ], "no-mixed-requires": [ "error" ], "no-new-require": [ "error" ], "no-path-concat": [ "error" ], "no-restricted-modules": [ "off" ], "no-sync": [ "off" ], /* Stylistic Issues: */ "array-bracket-spacing": [ "error", "never" ], "block-spacing": [ "error", "always" ], "brace-style": [ "error", "1tbs", { "allowSingleLine": true } ], "camelcase": [ "error", { "properties": "never" } ], "comma-dangle": [ "error", "never" ], "comma-spacing": [ "error", { "before": false, "after": true } ], "comma-style": [ "error", "last" ], "computed-property-spacing": [ "error", "never" ], "consistent-this": [ "error", "self", "that" ], "func-names": [ "off" ], "func-style": [ "error", "expression", { "allowArrowFunctions": true } ], "id-blacklist": [ "off" ], "id-length": [ "error", { "min": 2, "exceptions": [ "_", "$", "i", "j", "k", "q" ] } ], "id-match": [ "off" ], "indent": [ "error", 4, { "SwitchCase": 2 } ], "key-spacing": [ "error", { "beforeColon": false, "afterColon": true, "mode": "strict" } ], "keyword-spacing": [ "error", { "before": true } ], "linebreak-style": [ "error", "unix" ], "lines-around-comment": [ "off" ], "max-depth": [ "error", { "max": 4 } ], "max-len": [ "error", { "code": 120, "ignoreComments": true, "ignoreUrls": true, "ignorePattern": "(_.)|(log.(warn|error|info))||(new Error\\()" } ], "max-lines": [ "error", { "max": 1000, "skipComments": true } ], "max-nested-callbacks": [ "error", { "max": 5 } ], "max-params": [ "error", { "max": 4 } ], "max-statements-per-line": [ "error", { "max": 1 } ], "max-statements": [ "error", { "max": 100 }, { "ignoreTopLevelFunctions": true } ], "multiline-ternary": [ "off" ], "new-cap": [ "error", { "newIsCap": true, "capIsNew": false, "properties": true } ], "new-parens": [ "error" ], "newline-after-var": [ "off" ], "newline-before-return": [ "off" ], "no-array-constructor": [ "error" ], "no-bitwise": [ "error" ], "no-continue": [ "error" ], "no-inline-comments": [ "off" ], "no-lonely-if": [ "error" ], "no-mixed-operators": [ "error" ], "no-mixed-spaces-and-tabs": [ "error" ], "no-multiple-empty-lines": [ "off" // :'( ], "no-negated-condition": [ "off" ], "no-new-object": [ "error" ], "no-restricted-syntax": [ "off" ], "no-spaced-func": [ "error" ], "no-tabs": [ "error" ], "no-ternary": [ "off" ], "no-trailing-spaces": [ "error" ], /* "no-underscore-dangle": [ "error", { "allow" : ["_id"], "allowAfterThis": true, "allowAfterSuper": true } ],*/ "no-unneeded-ternary": [ "error" ], "no-whitespace-before-property": [ "error" ], "object-curly-newline": [ "off" // https://github.com/eslint/eslint/issues/6488#issuecomment-227383081 ], "object-curly-spacing": [ "error", "always", { "objectsInObjects": true, "arraysInObjects": true } ], "object-property-newline": [ "off" ], "one-var-declaration-per-line": [ "error" ], "one-var": [ "error", "never" ], "operator-assignment": [ "error", "always" ], "quote-props": [ "error", "consistent", { "unnecessary": false, "keywords": true, "numbers": true } ], "quotes": [ "error", "single", { "avoidEscape": true, "allowTemplateLiterals": true } ], "require-jsdoc": [ // TODO Enable some of these? "error", { "require": { "FunctionDeclaration": false, "MethodDefinition": false, "ClassDeclaration": false } } ], "semi-spacing": [ "error", { "before": false, "after": true } ], "semi": [ "error", "always" ], "sort-vars": [ "off" ], "space-before-blocks": [ "error", { "functions": "always", "keywords": "always", "classes": "always" } ], "space-before-function-paren": [ "error", { "anonymous": "always", "named": "never" } ], "space-in-parens": [ "error", "never" ], "space-infix-ops": [ "error" ], "space-unary-ops": [ "error", { "words": true, "nonwords": false } ], "spaced-comment": [ "error", "always", { "exceptions": [ "-" ] } ], "unicode-bom": [ "error", "never" ], "wrap-regex": [ "off" ], "arrow-body-style": [ // TODO Unsure about this rule... "off" ], "arrow-parens": [ // TODO Unsure about this rule... "error", "as-needed" ], "arrow-spacing": [ "error", { "before": true, "after": true } ], "constructor-super": [ "error" ], "generator-star-spacing": [ "error", { "before": false, "after": true } ], "no-class-assign": [ "error" ], "no-confusing-arrow": [ "error", { "allowParens": false } ], "no-const-assign": [ "error" ], "no-dupe-class-members": [ "error" ], "no-duplicate-imports": [ "error", { "includeExports": true } ], "no-new-symbol": [ "error" ], "no-restricted-imports": [ "off" ], "no-this-before-super": [ "error" ], "no-useless-computed-key": [ "error" ], "no-useless-constructor": [ "off" ], "no-useless-rename": [ "error" ], "no-var": [ "error" ], "object-shorthand": [ "error", "always", { "avoidQuotes": true } ], "prefer-arrow-callback": [ "error" ], "prefer-const": [ "error" ], "prefer-reflect": [ // TODO Unsure about this rule... "off" ], "prefer-rest-params": [ // TODO Unsure about this rule... "off" ], "prefer-spread": [ "error" ], "prefer-template": [ "error" ], "require-yield": [ "off" ], "rest-spread-spacing": [ "error", "never" ], "template-curly-spacing": [ "error", "never" ], "yield-star-spacing": [ "error", { "before": false, "after": true } ] } }