|
| 1 | +{ |
| 2 | + "root": true, |
| 3 | + "parser": "@typescript-eslint/parser", |
| 4 | + "plugins": [ |
| 5 | + "@typescript-eslint" |
| 6 | + ], |
| 7 | + "ignorePatterns": ["dist/"], |
| 8 | + "extends": [], |
| 9 | + "rules": { |
| 10 | + /* possible errors */ |
| 11 | + "no-cond-assign" : 2, |
| 12 | + // "no-console" : 2, |
| 13 | + "no-constant-condition" : 2, |
| 14 | + "no-control-regex" : 2, |
| 15 | + "no-debugger" : 2, |
| 16 | + "no-dupe-args" : 2, |
| 17 | + "no-dupe-keys" : 2, |
| 18 | + "no-duplicate-case" : 2, |
| 19 | + "no-empty-character-class" : 2, |
| 20 | + "no-empty" : 2, |
| 21 | + "no-ex-assign" : 2, |
| 22 | + "no-extra-boolean-cast" : 2, |
| 23 | + "no-extra-parens" : 1, |
| 24 | + "no-extra-semi" : 2, |
| 25 | + "no-func-assign" : 2, |
| 26 | + "no-inner-declarations" : 2, |
| 27 | + "no-invalid-regexp" : 2, |
| 28 | + "no-irregular-whitespace" : 2, |
| 29 | + "no-negated-in-lhs" : 2, |
| 30 | + "no-obj-calls" : 2, |
| 31 | + "no-regex-spaces" : 2, |
| 32 | + "no-sparse-arrays" : 2, |
| 33 | + "no-unreachable" : 2, |
| 34 | + "use-isnan" : 2, |
| 35 | + "valid-jsdoc" : [1, { |
| 36 | + "requireReturnType": false, |
| 37 | + "requireParamType": false, |
| 38 | + "requireReturn": false |
| 39 | + }], |
| 40 | + "valid-typeof" : 2, |
| 41 | + "no-unexpected-multiline" : 2, |
| 42 | + |
| 43 | + /* best practises */ |
| 44 | + "accessor-pairs" : 1, |
| 45 | + "block-scoped-var" : 2, |
| 46 | + "complexity" : [1, 9], |
| 47 | + "consistent-return" : 2, |
| 48 | + "curly" : 0, //TODO |
| 49 | + "default-case" : 1, |
| 50 | + "dot-notation" : 1, |
| 51 | + "dot-location" : [1, "property"], |
| 52 | + "eqeqeq" : 2, |
| 53 | + "guard-for-in" : 1, |
| 54 | + "no-alert" : 2, |
| 55 | + "no-caller" : 1, |
| 56 | + "no-div-regex" : 1, |
| 57 | + "no-else-return" : 1, |
| 58 | + "no-eq-null" : 2, |
| 59 | + "no-eval" : 1, |
| 60 | + "no-extend-native" : 0, |
| 61 | + |
| 62 | + //"no-extra-bind" es6 |
| 63 | + "no-fallthrough" : 2, |
| 64 | + "no-floating-decimal" : 1, |
| 65 | + "no-implicit-coercion" : 0, |
| 66 | + "no-implied-eval" : 2, |
| 67 | + |
| 68 | + //"no-invalid-this" es6 |
| 69 | + "no-iterator" : 2, |
| 70 | + "no-labels" : 2, |
| 71 | + "no-lone-blocks" : 2, |
| 72 | + "no-loop-func" : 2, |
| 73 | + "no-multi-spaces" : 1, |
| 74 | + "no-multi-str" : 2, |
| 75 | + "no-native-reassign" : 2, |
| 76 | + "no-new-func" : 2, |
| 77 | + "no-new-wrappers" : 2, |
| 78 | + "no-new" : 0, |
| 79 | + "no-octal-escape" : 2, |
| 80 | + "no-octal" : 2, |
| 81 | + "no-param-reassign" : 0, |
| 82 | + |
| 83 | + //"no-process-env" node |
| 84 | + "no-proto" : 2, |
| 85 | + "no-redeclare" : 2, |
| 86 | + "no-return-assign" : 2, |
| 87 | + "no-script-url" : 2, |
| 88 | + "no-self-compare" : 2, |
| 89 | + "no-sequences" : 1, |
| 90 | + "no-throw-literal" : 1, |
| 91 | + "no-unused-expressions" : 2, |
| 92 | + "no-useless-concat" : 2, |
| 93 | + "no-void" : 2, |
| 94 | + "no-warning-comments" : 0, |
| 95 | + "no-with" : 1, |
| 96 | + "radix" : 2, |
| 97 | + "vars-on-top" : 0, |
| 98 | + "wrap-iife" : [2, "inside"], |
| 99 | + "yoda" : 2, |
| 100 | + |
| 101 | + /* variables */ |
| 102 | + "init-declarations" : 0, |
| 103 | + "no-catch-shadow" : 2, |
| 104 | + "no-delete-var" : 2, |
| 105 | + "no-label-var" : 2, |
| 106 | + "no-shadow-restricted-names" : 2, |
| 107 | + "no-shadow" : 0, |
| 108 | + "no-undef-init" : 2, |
| 109 | + "no-undef" : 0, |
| 110 | + "no-undefined:" : 0, |
| 111 | + "no-use-before-define" : 2, |
| 112 | + |
| 113 | + /* stylistic issues */ |
| 114 | + "array-bracket-spacing" : 1, |
| 115 | + "block-spacing" : 1, |
| 116 | + "brace-style" : [1, "1tbs", {"allowSingleLine": true}], |
| 117 | + "camelcase" : [1, {"properties": "never"}], |
| 118 | + "comma-spacing" : 1, |
| 119 | + "comma-style" : 1, |
| 120 | + "computed-property-spacing" : 1, |
| 121 | + "consistent-this": [1, "_this"], |
| 122 | + "eol-last" : 2, |
| 123 | + "func-names" : 0, |
| 124 | + "func-style" : 0, |
| 125 | + "id-length" : 0, |
| 126 | + "id-match": 0, |
| 127 | + "indent": [1, 4], |
| 128 | + "key-spacing" : [0, {"beforeColon" : true, "afterColon" : true}], |
| 129 | + "lines-around-comment" : 0, |
| 130 | + "linebreak-style" : [2, "unix"], |
| 131 | + "max-nested-callbacks" : [1, 3], |
| 132 | + "new-cap" : 0, |
| 133 | + "new-parens" : 1, |
| 134 | + "newline-after-var" : 0, |
| 135 | + "no-array-constructor" : 1, |
| 136 | + "no-continue" : 0, |
| 137 | + "no-inline-comments" : 0, |
| 138 | + "no-lonely-if" : 1, |
| 139 | + "no-mixed-spaces-and-tabs" : 1, |
| 140 | + "no-multiple-empty-lines" : 1, |
| 141 | + "no-nested-ternary" : 1, |
| 142 | + "no-negated-condition" : 0, |
| 143 | + "no-new-object" : 1, |
| 144 | + "no-restricted-syntax" : 0, |
| 145 | + "no-spaced-func" : 1, |
| 146 | + "no-ternary" : 0, |
| 147 | + "no-trailing-spaces" : [1, {"ignoreComments": true}], |
| 148 | + "no-underscore-dangle" : 0, |
| 149 | + "no-unneeded-ternary" : 1, |
| 150 | + "object-curly-spacing" : [2, "always"], |
| 151 | + "one-var" : 0, |
| 152 | + "operator-assignment" : 1, |
| 153 | + "operator-linebreak" : 1, |
| 154 | + "padded-blocks" : 0, |
| 155 | + "padding-line-between-statements": [2, |
| 156 | + { "blankLine": "always", "prev": ["const", "let"], "next": "*" }, |
| 157 | + { "blankLine": "never", "prev": ["const"], "next": ["const"] }, |
| 158 | + { "blankLine": "never", "prev": ["let"], "next": ["let"] }, |
| 159 | + { "blankLine": "always", "prev": "directive", "next": "*" }, |
| 160 | + { "blankLine": "any", "prev": "directive", "next": "directive" } |
| 161 | + ], |
| 162 | + "quote-props": [1, "as-needed"], |
| 163 | + "quotes": [ 2, "double"], |
| 164 | + "require-jsdo" : 0, |
| 165 | + "semi-spacing" : 1, |
| 166 | + "semi": ["error", "always"], |
| 167 | + "sort-vars" : 0, |
| 168 | + "keyword-spacing" : ["error", { "before": true, "after": true }], |
| 169 | + "space-before-function-paren" : [1, {"anonymous": "never", "named": "never", "asyncArrow": "always"}], |
| 170 | + "space-in-parens": [1, "never"], |
| 171 | + "space-infix-ops" : 1, |
| 172 | + "space-unary-ops" : 1, |
| 173 | + "spaced-comment" : 0, |
| 174 | + "wrap-regex" : 1, |
| 175 | + "@typescript-eslint/no-unused-vars": [2, { |
| 176 | + "varsIgnorePattern" : "^(_this|options|defaults)", |
| 177 | + "argsIgnorePattern" : "^(_|options|defaults)"} |
| 178 | + ], |
| 179 | + "@typescript-eslint/no-useless-constructor": "error", |
| 180 | + "@typescript-eslint/no-shadow": ["error"], |
| 181 | + |
| 182 | + "max-len": [ |
| 183 | + "warn", |
| 184 | + { |
| 185 | + "code": 120, |
| 186 | + "tabWidth": 4, |
| 187 | + "comments": 120, |
| 188 | + "ignoreComments": false, |
| 189 | + "ignoreTrailingComments": true, |
| 190 | + "ignoreUrls": true, |
| 191 | + "ignoreStrings": true, |
| 192 | + "ignoreTemplateLiterals": true, |
| 193 | + "ignoreRegExpLiterals": true |
| 194 | + } |
| 195 | + ] |
| 196 | + } |
| 197 | +} |
0 commit comments