|
| 1 | +module.exports = { |
| 2 | + "env": { |
| 3 | + "browser": true, |
| 4 | + "node": true |
| 5 | + }, |
| 6 | + "extends": [ |
| 7 | + "plugin:@typescript-eslint/recommended", |
| 8 | + "plugin:@typescript-eslint/recommended-requiring-type-checking" |
| 9 | + ], |
| 10 | + "parser": "@typescript-eslint/parser", |
| 11 | + "parserOptions": { |
| 12 | + "project": "tsconfig.json", |
| 13 | + "sourceType": "module" |
| 14 | + }, |
| 15 | + "plugins": [ |
| 16 | + "@typescript-eslint", |
| 17 | + "@typescript-eslint/tslint" |
| 18 | + ], |
| 19 | + "rules": { |
| 20 | + "@typescript-eslint/adjacent-overload-signatures": "warn", |
| 21 | + "@typescript-eslint/array-type": "warn", |
| 22 | + "@typescript-eslint/ban-types": "warn", |
| 23 | + "@typescript-eslint/class-name-casing": "warn", |
| 24 | + "@typescript-eslint/consistent-type-assertions": "warn", |
| 25 | + "@typescript-eslint/explicit-member-accessibility": [ |
| 26 | + "off", |
| 27 | + { |
| 28 | + "accessibility": "explicit" |
| 29 | + } |
| 30 | + ], |
| 31 | + "@typescript-eslint/indent": "warn", |
| 32 | + "@typescript-eslint/interface-name-prefix": "off", |
| 33 | + "@typescript-eslint/member-delimiter-style": [ |
| 34 | + "warn", |
| 35 | + { |
| 36 | + "multiline": { |
| 37 | + "delimiter": "none", |
| 38 | + "requireLast": true |
| 39 | + }, |
| 40 | + "singleline": { |
| 41 | + "delimiter": "semi", |
| 42 | + "requireLast": false |
| 43 | + } |
| 44 | + } |
| 45 | + ], |
| 46 | + "@typescript-eslint/member-ordering": "warn", |
| 47 | + "@typescript-eslint/no-empty-function": "warn", |
| 48 | + "@typescript-eslint/no-empty-interface": "off", |
| 49 | + "@typescript-eslint/no-explicit-any": "off", |
| 50 | + "@typescript-eslint/no-extraneous-class": "warn", |
| 51 | + "@typescript-eslint/no-misused-new": "warn", |
| 52 | + "@typescript-eslint/no-namespace": "off", |
| 53 | + "@typescript-eslint/no-parameter-properties": "off", |
| 54 | + "@typescript-eslint/no-require-imports": "warn", |
| 55 | + "@typescript-eslint/no-this-alias": "off", |
| 56 | + "@typescript-eslint/no-use-before-define": "off", |
| 57 | + "@typescript-eslint/no-var-requires": "warn", |
| 58 | + "@typescript-eslint/prefer-for-of": "warn", |
| 59 | + "@typescript-eslint/prefer-function-type": "warn", |
| 60 | + "@typescript-eslint/prefer-namespace-keyword": "warn", |
| 61 | + "@typescript-eslint/prefer-readonly": "warn", |
| 62 | + "@typescript-eslint/quotes": [ |
| 63 | + "warn", |
| 64 | + "double", |
| 65 | + { |
| 66 | + "avoidEscape": true |
| 67 | + } |
| 68 | + ], |
| 69 | + "@typescript-eslint/semi": [ |
| 70 | + "warn", |
| 71 | + "never" |
| 72 | + ], |
| 73 | + "@typescript-eslint/triple-slash-reference": "warn", |
| 74 | + "@typescript-eslint/unified-signatures": "warn", |
| 75 | + "arrow-body-style": "warn", |
| 76 | + "arrow-parens": [ |
| 77 | + "off", |
| 78 | + "as-needed" |
| 79 | + ], |
| 80 | + "camelcase": "warn", |
| 81 | + "comma-dangle": "off", |
| 82 | + "complexity": "off", |
| 83 | + "constructor-super": "warn", |
| 84 | + "curly": "warn", |
| 85 | + "dot-notation": "warn", |
| 86 | + "eol-last": "warn", |
| 87 | + "eqeqeq": [ |
| 88 | + "warn", |
| 89 | + "smart" |
| 90 | + ], |
| 91 | + "guard-for-in": "warn", |
| 92 | + "id-blacklist": [ |
| 93 | + "warn", |
| 94 | + "any", |
| 95 | + "Number", |
| 96 | + "number", |
| 97 | + "String", |
| 98 | + "string", |
| 99 | + "Boolean", |
| 100 | + "boolean", |
| 101 | + "Undefined", |
| 102 | + "undefined" |
| 103 | + ], |
| 104 | + "id-match": "warn", |
| 105 | + "import/no-default-export": "off", |
| 106 | + "import/order": "warn", |
| 107 | + "max-classes-per-file": [ |
| 108 | + "warn", |
| 109 | + 1 |
| 110 | + ], |
| 111 | + "max-len": [ |
| 112 | + "warn", |
| 113 | + { |
| 114 | + "code": 120 |
| 115 | + } |
| 116 | + ], |
| 117 | + "new-parens": "warn", |
| 118 | + "newline-per-chained-call": "off", |
| 119 | + "no-bitwise": "warn", |
| 120 | + "no-caller": "warn", |
| 121 | + "no-cond-assign": "warn", |
| 122 | + "no-console": "off", |
| 123 | + "no-debugger": "warn", |
| 124 | + "no-duplicate-imports": "warn", |
| 125 | + "no-empty": "warn", |
| 126 | + "no-eval": "warn", |
| 127 | + "no-fallthrough": "off", |
| 128 | + "no-invalid-this": "warn", |
| 129 | + "no-multiple-empty-lines": "warn", |
| 130 | + "no-new-wrappers": "warn", |
| 131 | + "no-redeclare": "warn", |
| 132 | + "no-shadow": [ |
| 133 | + "warn", |
| 134 | + { |
| 135 | + "hoist": "all" |
| 136 | + } |
| 137 | + ], |
| 138 | + "no-throw-literal": "warn", |
| 139 | + "no-trailing-spaces": "warn", |
| 140 | + "no-undef-init": "warn", |
| 141 | + "no-underscore-dangle": "warn", |
| 142 | + "no-unsafe-finally": "warn", |
| 143 | + "no-unused-expressions": "warn", |
| 144 | + "no-unused-labels": "warn", |
| 145 | + "no-var": "warn", |
| 146 | + "no-void": "warn", |
| 147 | + "object-shorthand": "warn", |
| 148 | + "one-var": [ |
| 149 | + "warn", |
| 150 | + "never" |
| 151 | + ], |
| 152 | + "prefer-arrow/prefer-arrow-functions": "warn", |
| 153 | + "prefer-const": "warn", |
| 154 | + "quote-props": "off", |
| 155 | + "radix": "warn", |
| 156 | + "space-before-function-paren": [ |
| 157 | + "warn", |
| 158 | + { |
| 159 | + "anonymous": "always", |
| 160 | + "named": "never", |
| 161 | + "asyncArrow": "always" |
| 162 | + } |
| 163 | + ], |
| 164 | + "spaced-comment": "warn", |
| 165 | + "use-isnan": "warn", |
| 166 | + "valid-typeof": "off", |
| 167 | + "@typescript-eslint/tslint/config": [ |
| 168 | + "error", |
| 169 | + { |
| 170 | + "rules": { |
| 171 | + "jsdoc-format": true, |
| 172 | + "jsx-curly-spacing": [ |
| 173 | + true, |
| 174 | + "never" |
| 175 | + ], |
| 176 | + "jsx-equals-spacing": [ |
| 177 | + true, |
| 178 | + "never" |
| 179 | + ], |
| 180 | + "jsx-key": true, |
| 181 | + "jsx-no-bind": true, |
| 182 | + "jsx-no-string-ref": true, |
| 183 | + "jsx-self-close": true, |
| 184 | + "jsx-wrap-multiline": true, |
| 185 | + "no-reference-import": true, |
| 186 | + "one-line": [ |
| 187 | + true, |
| 188 | + "check-catch", |
| 189 | + "check-else", |
| 190 | + "check-finally", |
| 191 | + "check-open-brace", |
| 192 | + "check-whitespace" |
| 193 | + ], |
| 194 | + "whitespace": [ |
| 195 | + true, |
| 196 | + "check-branch", |
| 197 | + "check-decl", |
| 198 | + "check-operator", |
| 199 | + "check-module", |
| 200 | + "check-separator", |
| 201 | + "check-rest-spread", |
| 202 | + "check-type", |
| 203 | + "check-typecast", |
| 204 | + "check-type-operator", |
| 205 | + "check-preblock" |
| 206 | + ] |
| 207 | + } |
| 208 | + } |
| 209 | + ] |
| 210 | + } |
| 211 | +}; |
0 commit comments