|
| 1 | +{ |
| 2 | + "root": true, |
| 3 | + "env": { |
| 4 | + "browser": true, |
| 5 | + "es6": true, |
| 6 | + "node": true |
| 7 | + }, |
| 8 | + "extends": [ |
| 9 | + "eslint:recommended", |
| 10 | + "plugin:@typescript-eslint/recommended", |
| 11 | + "plugin:@typescript-eslint/eslint-recommended", |
| 12 | + "plugin:@typescript-eslint/recommended-requiring-type-checking" |
| 13 | + ], |
| 14 | + "parser": "@typescript-eslint/parser", |
| 15 | + "parserOptions": { |
| 16 | + "project": "tsconfig.json", |
| 17 | + "sourceType": "module" |
| 18 | + }, |
| 19 | + "plugins": [ |
| 20 | + "eslint-plugin-import", |
| 21 | + "eslint-plugin-prefer-arrow", |
| 22 | + "@typescript-eslint", |
| 23 | + "@typescript-eslint/eslint-plugin" |
| 24 | + ], |
| 25 | + "rules": { |
| 26 | + "@typescript-eslint/adjacent-overload-signatures": "error", |
| 27 | + "@typescript-eslint/array-type": [ |
| 28 | + "error", |
| 29 | + { |
| 30 | + "default": "array" |
| 31 | + } |
| 32 | + ], |
| 33 | + "@typescript-eslint/await-thenable": "error", |
| 34 | + "@typescript-eslint/ban-ts-comment": "warn", |
| 35 | + "@typescript-eslint/ban-types": [ |
| 36 | + "warn", |
| 37 | + { |
| 38 | + "types": { |
| 39 | + "Object": { |
| 40 | + "message": "Avoid using the `Object` type. Did you mean `object`?" |
| 41 | + }, |
| 42 | + "Function": { |
| 43 | + "message": "Avoid using the `Function` type. Prefer a specific function type, like `() => void`." |
| 44 | + }, |
| 45 | + "Boolean": { |
| 46 | + "message": "Avoid using the `Boolean` type. Did you mean `boolean`?" |
| 47 | + }, |
| 48 | + "Number": { |
| 49 | + "message": "Avoid using the `Number` type. Did you mean `number`?" |
| 50 | + }, |
| 51 | + "String": { |
| 52 | + "message": "Avoid using the `String` type. Did you mean `string`?" |
| 53 | + }, |
| 54 | + "Symbol": { |
| 55 | + "message": "Avoid using the `Symbol` type. Did you mean `symbol`?" |
| 56 | + } |
| 57 | + } |
| 58 | + } |
| 59 | + ], |
| 60 | + "@typescript-eslint/consistent-type-assertions": "error", |
| 61 | + "@typescript-eslint/dot-notation": "error", |
| 62 | + "@typescript-eslint/explicit-module-boundary-types": "warn", |
| 63 | + "@typescript-eslint/indent": [ |
| 64 | + "error", |
| 65 | + 2 |
| 66 | + ], |
| 67 | + "@typescript-eslint/member-delimiter-style": [ |
| 68 | + "error", |
| 69 | + { |
| 70 | + "multiline": { |
| 71 | + "delimiter": "none", |
| 72 | + "requireLast": false |
| 73 | + }, |
| 74 | + "singleline": { |
| 75 | + "delimiter": "comma", |
| 76 | + "requireLast": false |
| 77 | + } |
| 78 | + } |
| 79 | + ], |
| 80 | + "@typescript-eslint/member-ordering": "off", |
| 81 | + "@typescript-eslint/naming-convention": "off", |
| 82 | + "@typescript-eslint/no-array-constructor": "error", |
| 83 | + "@typescript-eslint/no-empty-function": "error", |
| 84 | + "@typescript-eslint/no-empty-interface": "error", |
| 85 | + "@typescript-eslint/no-explicit-any": "off", |
| 86 | + "@typescript-eslint/no-extra-non-null-assertion": "error", |
| 87 | + "@typescript-eslint/no-extra-semi": "error", |
| 88 | + "@typescript-eslint/no-floating-promises": "error", |
| 89 | + "@typescript-eslint/no-for-in-array": "error", |
| 90 | + "@typescript-eslint/no-implied-eval": "off", |
| 91 | + "@typescript-eslint/no-inferrable-types": "error", |
| 92 | + "@typescript-eslint/no-misused-new": "error", |
| 93 | + "@typescript-eslint/no-misused-promises": "error", |
| 94 | + "@typescript-eslint/no-namespace": "error", |
| 95 | + "@typescript-eslint/no-non-null-asserted-optional-chain": "error", |
| 96 | + "@typescript-eslint/no-non-null-assertion": "warn", |
| 97 | + "@typescript-eslint/no-parameter-properties": "off", |
| 98 | + "@typescript-eslint/no-shadow": [ |
| 99 | + "error", |
| 100 | + { |
| 101 | + "hoist": "all" |
| 102 | + } |
| 103 | + ], |
| 104 | + "@typescript-eslint/no-this-alias": "error", |
| 105 | + "@typescript-eslint/no-unnecessary-type-assertion": "error", |
| 106 | + "@typescript-eslint/no-unsafe-assignment": "off", |
| 107 | + "@typescript-eslint/no-unsafe-call": "off", |
| 108 | + "@typescript-eslint/no-unsafe-member-access": "off", |
| 109 | + "@typescript-eslint/no-unsafe-return": "error", |
| 110 | + "@typescript-eslint/no-unused-expressions": "error", |
| 111 | + "@typescript-eslint/no-unused-vars": [ |
| 112 | + "error", |
| 113 | + { |
| 114 | + "argsIgnorePattern": "^_" |
| 115 | + } |
| 116 | + ], |
| 117 | + "@typescript-eslint/no-use-before-define": "off", |
| 118 | + "@typescript-eslint/no-var-requires": "off", |
| 119 | + "@typescript-eslint/prefer-as-const": "error", |
| 120 | + "@typescript-eslint/prefer-for-of": "error", |
| 121 | + "@typescript-eslint/prefer-function-type": "error", |
| 122 | + "@typescript-eslint/prefer-namespace-keyword": "error", |
| 123 | + "@typescript-eslint/prefer-regexp-exec": "off", |
| 124 | + "@typescript-eslint/quotes": [ |
| 125 | + "error", |
| 126 | + "single", |
| 127 | + { |
| 128 | + "avoidEscape": true |
| 129 | + } |
| 130 | + ], |
| 131 | + "@typescript-eslint/require-await": "error", |
| 132 | + "@typescript-eslint/restrict-plus-operands": "error", |
| 133 | + "@typescript-eslint/restrict-template-expressions": "off", |
| 134 | + "@typescript-eslint/semi": [ |
| 135 | + "error", |
| 136 | + "never" |
| 137 | + ], |
| 138 | + "@typescript-eslint/triple-slash-reference": [ |
| 139 | + "error", |
| 140 | + { |
| 141 | + "path": "always", |
| 142 | + "types": "prefer-import", |
| 143 | + "lib": "always" |
| 144 | + } |
| 145 | + ], |
| 146 | + "@typescript-eslint/unbound-method": "error", |
| 147 | + "@typescript-eslint/unified-signatures": "error", |
| 148 | + "arrow-body-style": "error", |
| 149 | + "arrow-parens": [ |
| 150 | + "error", |
| 151 | + "as-needed" |
| 152 | + ], |
| 153 | + "brace-style": [ |
| 154 | + "error", |
| 155 | + "stroustrup", |
| 156 | + { |
| 157 | + "allowSingleLine": true |
| 158 | + } |
| 159 | + ], |
| 160 | + "comma-dangle": [ |
| 161 | + "error", |
| 162 | + { |
| 163 | + "objects": "always-multiline", |
| 164 | + "arrays": "always-multiline", |
| 165 | + "functions": "never" |
| 166 | + } |
| 167 | + ], |
| 168 | + "complexity": "off", |
| 169 | + "constructor-super": "error", |
| 170 | + "curly": [ |
| 171 | + "error", |
| 172 | + "multi-line" |
| 173 | + ], |
| 174 | + "eol-last": "error", |
| 175 | + "eqeqeq": [ |
| 176 | + "error", |
| 177 | + "smart" |
| 178 | + ], |
| 179 | + "guard-for-in": "error", |
| 180 | + "id-blacklist": [ |
| 181 | + "error", |
| 182 | + "any", |
| 183 | + "Number", |
| 184 | + "number", |
| 185 | + "String", |
| 186 | + "string", |
| 187 | + "Boolean", |
| 188 | + "boolean", |
| 189 | + "Undefined", |
| 190 | + "undefined" |
| 191 | + ], |
| 192 | + "id-match": "error", |
| 193 | + "import/order": "off", |
| 194 | + "linebreak-style": [ |
| 195 | + "error", |
| 196 | + "unix" |
| 197 | + ], |
| 198 | + "max-classes-per-file": "off", |
| 199 | + "max-len": [ |
| 200 | + "warn", |
| 201 | + { |
| 202 | + "code": 240 |
| 203 | + } |
| 204 | + ], |
| 205 | + "new-parens": "off", |
| 206 | + "no-array-constructor": "off", |
| 207 | + "no-bitwise": "error", |
| 208 | + "no-caller": "error", |
| 209 | + "no-cond-assign": "off", |
| 210 | + "no-console": "error", |
| 211 | + "no-debugger": "error", |
| 212 | + "no-empty": [ |
| 213 | + "error", |
| 214 | + { |
| 215 | + "allowEmptyCatch": true |
| 216 | + } |
| 217 | + ], |
| 218 | + "no-empty-function": "off", |
| 219 | + "no-eval": "error", |
| 220 | + "no-extra-semi": "off", |
| 221 | + "no-fallthrough": "off", |
| 222 | + "no-implied-eval": "off", |
| 223 | + "no-invalid-this": "off", |
| 224 | + "no-irregular-whitespace": "error", |
| 225 | + "no-magic-numbers": "off", |
| 226 | + "@typescript-eslint/no-magic-numbers": "off", |
| 227 | + "no-new-wrappers": "error", |
| 228 | + "no-redeclare": "error", |
| 229 | + "no-throw-literal": "error", |
| 230 | + "no-trailing-spaces": "error", |
| 231 | + "no-undef-init": "error", |
| 232 | + "no-underscore-dangle": [ |
| 233 | + "error", |
| 234 | + { |
| 235 | + "allowAfterThis": true |
| 236 | + } |
| 237 | + ], |
| 238 | + "no-unsafe-finally": "error", |
| 239 | + "no-unused-labels": "error", |
| 240 | + "no-unused-vars": "off", |
| 241 | + "no-var": "error", |
| 242 | + "object-shorthand": "error", |
| 243 | + "one-var": [ |
| 244 | + "off", |
| 245 | + "never" |
| 246 | + ], |
| 247 | + "prefer-arrow/prefer-arrow-functions": [ |
| 248 | + "error", |
| 249 | + { |
| 250 | + "allowStandaloneDeclarations": true |
| 251 | + } |
| 252 | + ], |
| 253 | + "prefer-const": [ |
| 254 | + "error", |
| 255 | + { |
| 256 | + "destructuring": "all" |
| 257 | + } |
| 258 | + ], |
| 259 | + "prefer-object-spread": "error", |
| 260 | + "prefer-template": "error", |
| 261 | + "quote-props": [ |
| 262 | + "error", |
| 263 | + "as-needed" |
| 264 | + ], |
| 265 | + "radix": "off", |
| 266 | + "require-await": "off", |
| 267 | + "space-before-function-paren": [ |
| 268 | + "error", |
| 269 | + { |
| 270 | + "anonymous": "never", |
| 271 | + "named": "never", |
| 272 | + "asyncArrow": "always" |
| 273 | + } |
| 274 | + ], |
| 275 | + "spaced-comment": [ |
| 276 | + "error", |
| 277 | + "always", |
| 278 | + { |
| 279 | + "markers": [ |
| 280 | + "/" |
| 281 | + ] |
| 282 | + } |
| 283 | + ], |
| 284 | + "use-isnan": "error", |
| 285 | + "valid-typeof": "off", |
| 286 | + "yoda": "error", |
| 287 | + "@typescript-eslint/consistent-type-definitions": "off", |
| 288 | + "no-new-func": "off" |
| 289 | + }, |
| 290 | + "ignorePatterns": [ |
| 291 | + "webpack.config.ts", |
| 292 | + "util/*.ts", |
| 293 | + "minitests/*.ts", |
| 294 | + "content/minitests/*.ts" |
| 295 | + ] |
| 296 | +} |
0 commit comments