|
| 1 | +{ |
| 2 | + "env": { |
| 3 | + "browser": true, |
| 4 | + "es6": true, |
| 5 | + "node": true |
| 6 | + }, |
| 7 | + "extends": [ |
| 8 | + "eslint:recommended", |
| 9 | + "plugin:@typescript-eslint/recommended", |
| 10 | + "plugin:@typescript-eslint/recommended-requiring-type-checking" |
| 11 | + ], |
| 12 | + "parser": "@typescript-eslint/parser", |
| 13 | + "parserOptions": { |
| 14 | + "project": "tsconfig.json", |
| 15 | + "sourceType": "module" |
| 16 | + }, |
| 17 | + "plugins": [ |
| 18 | + "eslint-plugin-import", |
| 19 | + "eslint-plugin-jsdoc", |
| 20 | + "eslint-plugin-l13", |
| 21 | + "@typescript-eslint" |
| 22 | + ], |
| 23 | + "rules": { |
| 24 | + "@typescript-eslint/array-type": [ |
| 25 | + "error", |
| 26 | + { |
| 27 | + "default": "array-simple" |
| 28 | + } |
| 29 | + ], |
| 30 | + "@typescript-eslint/ban-types": [ |
| 31 | + "error", |
| 32 | + { |
| 33 | + "types": { |
| 34 | + "Object": { |
| 35 | + "message": "Avoid using the `Object` type. Did you mean `object`?" |
| 36 | + }, |
| 37 | + "Function": { |
| 38 | + "message": "Avoid using the `Function` type. Prefer a specific function type, like `() => void`." |
| 39 | + }, |
| 40 | + "Boolean": { |
| 41 | + "message": "Avoid using the `Boolean` type. Did you mean `boolean`?" |
| 42 | + }, |
| 43 | + "Number": { |
| 44 | + "message": "Avoid using the `Number` type. Did you mean `number`?" |
| 45 | + }, |
| 46 | + "String": { |
| 47 | + "message": "Avoid using the `String` type. Did you mean `string`?" |
| 48 | + }, |
| 49 | + "Symbol": { |
| 50 | + "message": "Avoid using the `Symbol` type. Did you mean `symbol`?" |
| 51 | + } |
| 52 | + } |
| 53 | + } |
| 54 | + ], |
| 55 | + "brace-style": "off", |
| 56 | + "@typescript-eslint/brace-style": "error", |
| 57 | + "comma-dangle": "off", |
| 58 | + "@typescript-eslint/comma-dangle": [ |
| 59 | + "error", |
| 60 | + { |
| 61 | + "arrays": "always-multiline", |
| 62 | + "enums": "always-multiline", |
| 63 | + "exports": "always-multiline", |
| 64 | + "functions": "never", |
| 65 | + "generics": "always-multiline", |
| 66 | + "imports": "always-multiline", |
| 67 | + "objects": "always-multiline", |
| 68 | + "tuples": "always-multiline" |
| 69 | + } |
| 70 | + ], |
| 71 | + "comma-spacing": "off", |
| 72 | + "@typescript-eslint/comma-spacing": "error", |
| 73 | + "@typescript-eslint/consistent-type-assertions": [ |
| 74 | + "error", |
| 75 | + { |
| 76 | + "assertionStyle": "angle-bracket" |
| 77 | + } |
| 78 | + ], |
| 79 | + "@typescript-eslint/consistent-type-definitions": "off", |
| 80 | + "default-param-last": "off", |
| 81 | + "@typescript-eslint/default-param-last": "error", |
| 82 | + "dot-notation": "off", |
| 83 | + "@typescript-eslint/dot-notation": "error", |
| 84 | + "@typescript-eslint/explicit-module-boundary-types": "off", |
| 85 | + "func-call-spacing": "off", |
| 86 | + "@typescript-eslint/func-call-spacing": "error", |
| 87 | + "indent": "off", |
| 88 | + "@typescript-eslint/indent": [ |
| 89 | + "error", |
| 90 | + "tab", |
| 91 | + { |
| 92 | + "ignoreComments": true, |
| 93 | + "ArrayExpression": 1, |
| 94 | + "FunctionDeclaration": { |
| 95 | + "body": 1 |
| 96 | + }, |
| 97 | + "MemberExpression": 1, |
| 98 | + "ObjectExpression": 1, |
| 99 | + "SwitchCase": 1 |
| 100 | + } |
| 101 | + ], |
| 102 | + "keyword-spacing": "off", |
| 103 | + "@typescript-eslint/keyword-spacing": "error", |
| 104 | + "lines-between-class-members": "off", |
| 105 | + "@typescript-eslint/lines-between-class-members": [ |
| 106 | + "error", |
| 107 | + "always", |
| 108 | + { |
| 109 | + "exceptAfterSingleLine": true |
| 110 | + } |
| 111 | + ], |
| 112 | + "@typescript-eslint/member-ordering": "off", |
| 113 | + "camelcase": "off", |
| 114 | + "@typescript-eslint/naming-convention": [ |
| 115 | + "error", |
| 116 | + { |
| 117 | + "selector": "default", |
| 118 | + "format": [ |
| 119 | + "camelCase", |
| 120 | + "PascalCase", |
| 121 | + "UPPER_CASE" |
| 122 | + ], |
| 123 | + "leadingUnderscore": "allow", |
| 124 | + "trailingUnderscore": "forbid" |
| 125 | + } |
| 126 | + ], |
| 127 | + "@typescript-eslint/no-dupe-class-members": "error", |
| 128 | + "no-duplicate-imports": "off", |
| 129 | + "@typescript-eslint/no-duplicate-imports": "error", |
| 130 | + "@typescript-eslint/no-explicit-any": "off", |
| 131 | + "no-extra-parens": "off", |
| 132 | + "@typescript-eslint/no-extra-parens": [ |
| 133 | + "error", |
| 134 | + "all", |
| 135 | + { |
| 136 | + "conditionalAssign": false |
| 137 | + } |
| 138 | + ], |
| 139 | + "@typescript-eslint/no-floating-promises": "off", |
| 140 | + "no-invalid-this": "off", |
| 141 | + "@typescript-eslint/no-invalid-this": "error", |
| 142 | + "no-loop-func": "off", |
| 143 | + "@typescript-eslint/no-loop-func": "error", |
| 144 | + "no-loss-of-precision": "off", |
| 145 | + "@typescript-eslint/no-loss-of-precision": "error", |
| 146 | + "@typescript-eslint/no-misused-promises": "off", |
| 147 | + "@typescript-eslint/no-parameter-properties": "off", |
| 148 | + "@typescript-eslint/no-redeclare": "error", |
| 149 | + "@typescript-eslint/no-require-imports": "error", |
| 150 | + "no-shadow": "off", |
| 151 | + "@typescript-eslint/no-shadow": [ |
| 152 | + "error", |
| 153 | + { |
| 154 | + "hoist": "all" |
| 155 | + } |
| 156 | + ], |
| 157 | + "no-throw-literal": "off", |
| 158 | + "@typescript-eslint/no-throw-literal": "error", |
| 159 | + "@typescript-eslint/no-unsafe-assignment": "off", |
| 160 | + "@typescript-eslint/no-unsafe-member-access": "off", |
| 161 | + "@typescript-eslint/no-unsafe-return": "off", |
| 162 | + "no-unused-expressions": "off", |
| 163 | + "@typescript-eslint/no-unused-expressions": "error", |
| 164 | + "no-useless-constructor": "off", |
| 165 | + "@typescript-eslint/no-useless-constructor": "error", |
| 166 | + "object-curly-spacing": "off", |
| 167 | + "@typescript-eslint/object-curly-spacing": [ |
| 168 | + "error", |
| 169 | + "always" |
| 170 | + ], |
| 171 | + "@typescript-eslint/prefer-for-of": "error", |
| 172 | + "@typescript-eslint/prefer-function-type": "error", |
| 173 | + "@typescript-eslint/prefer-literal-enum-member": "error", |
| 174 | + "quotes": "off", |
| 175 | + "@typescript-eslint/quotes": [ |
| 176 | + "error", |
| 177 | + "single" |
| 178 | + ], |
| 179 | + "@typescript-eslint/restrict-template-expressions": "off", |
| 180 | + "space-infix-ops": "off", |
| 181 | + "@typescript-eslint/space-infix-ops": [ |
| 182 | + "error", |
| 183 | + { |
| 184 | + "int32Hint": false |
| 185 | + } |
| 186 | + ], |
| 187 | + "semi": "off", |
| 188 | + "@typescript-eslint/semi": "error", |
| 189 | + "space-before-function-paren": "off", |
| 190 | + "@typescript-eslint/space-before-function-paren": "error", |
| 191 | + "@typescript-eslint/type-annotation-spacing": "error", |
| 192 | + "@typescript-eslint/triple-slash-reference": [ |
| 193 | + "error", |
| 194 | + { |
| 195 | + "path": "never", |
| 196 | + "types": "never", |
| 197 | + "lib": "never" |
| 198 | + } |
| 199 | + ], |
| 200 | + "@typescript-eslint/unified-signatures": "error", |
| 201 | + "import/first": "error", |
| 202 | + "import/newline-after-import": "error", |
| 203 | + "import/no-dynamic-require": "error", |
| 204 | + "import/order": "error", |
| 205 | + "jsdoc/check-alignment": "error", |
| 206 | + "jsdoc/check-indentation": "error", |
| 207 | + "jsdoc/newline-after-description": "error", |
| 208 | + "l13/padded-blocks-extended": [ |
| 209 | + "error", |
| 210 | + { |
| 211 | + "blocks": "never", |
| 212 | + "classes": "always", |
| 213 | + "functions": "always", |
| 214 | + "switches": "never" |
| 215 | + } |
| 216 | + ], |
| 217 | + "array-bracket-spacing": "error", |
| 218 | + "array-callback-return": "error", |
| 219 | + "arrow-parens": "error", |
| 220 | + "arrow-spacing": "error", |
| 221 | + "block-spacing": "error", |
| 222 | + "complexity": "off", |
| 223 | + "comma-style": "error", |
| 224 | + "curly": [ |
| 225 | + "error", |
| 226 | + "multi-line" |
| 227 | + ], |
| 228 | + "default-case-last": "error", |
| 229 | + "dot-location": [ |
| 230 | + "error", |
| 231 | + "property" |
| 232 | + ], |
| 233 | + "eol-last": [ |
| 234 | + "off", |
| 235 | + "never" |
| 236 | + ], |
| 237 | + "eqeqeq": [ |
| 238 | + "error", |
| 239 | + "smart" |
| 240 | + ], |
| 241 | + "func-style": [ |
| 242 | + "error", |
| 243 | + "declaration" |
| 244 | + ], |
| 245 | + "function-paren-newline": [ |
| 246 | + "error", |
| 247 | + "never" |
| 248 | + ], |
| 249 | + "grouped-accessor-pairs": [ |
| 250 | + "error", |
| 251 | + "getBeforeSet" |
| 252 | + ], |
| 253 | + "guard-for-in": "off", |
| 254 | + "id-denylist": [ |
| 255 | + "error", |
| 256 | + "any", |
| 257 | + "boolean", |
| 258 | + "number", |
| 259 | + "string", |
| 260 | + "Undefined" |
| 261 | + ], |
| 262 | + "id-match": "error", |
| 263 | + "implicit-arrow-linebreak": "error", |
| 264 | + "key-spacing": "error", |
| 265 | + "linebreak-style": [ |
| 266 | + "error", |
| 267 | + "unix" |
| 268 | + ], |
| 269 | + "max-classes-per-file": "error", |
| 270 | + "max-len": [ |
| 271 | + "warn", |
| 272 | + { |
| 273 | + "code": 160 |
| 274 | + } |
| 275 | + ], |
| 276 | + "multiline-ternary": [ |
| 277 | + "error", |
| 278 | + "never" |
| 279 | + ], |
| 280 | + "new-parens": "error", |
| 281 | + "no-bitwise": "error", |
| 282 | + "no-caller": "error", |
| 283 | + "no-console": "warn", |
| 284 | + "no-else-return": "error", |
| 285 | + "no-eval": "error", |
| 286 | + "no-label-var": "error", |
| 287 | + "no-lonely-if": "error", |
| 288 | + "no-multiple-empty-lines": [ |
| 289 | + "error", |
| 290 | + { |
| 291 | + "max": 3, |
| 292 | + "maxBOF": 0, |
| 293 | + "maxEOF": 1 |
| 294 | + } |
| 295 | + ], |
| 296 | + "no-multi-spaces": "error", |
| 297 | + "no-multi-str": "error", |
| 298 | + "no-new": "error", |
| 299 | + "no-new-wrappers": "error", |
| 300 | + "no-new-func": "error", |
| 301 | + "no-nonoctal-decimal-escape": "error", |
| 302 | + "no-octal-escape": "error", |
| 303 | + "no-proto": "error", |
| 304 | + "no-restricted-syntax": [ |
| 305 | + "error", |
| 306 | + "WithStatement" |
| 307 | + ], |
| 308 | + "no-script-url": "error", |
| 309 | + "no-self-compare": "error", |
| 310 | + "no-sequences": "error", |
| 311 | + "no-template-curly-in-string": "error", |
| 312 | + "no-trailing-spaces": [ |
| 313 | + "error", |
| 314 | + { |
| 315 | + "skipBlankLines": true |
| 316 | + } |
| 317 | + ], |
| 318 | + "no-undef-init": "error", |
| 319 | + "no-underscore-dangle": "off", |
| 320 | + "no-unneeded-ternary": "error", |
| 321 | + "no-unreachable-loop": "error", |
| 322 | + "no-useless-concat": "error", |
| 323 | + "no-useless-rename": "error", |
| 324 | + "no-whitespace-before-property": "error", |
| 325 | + "nonblock-statement-body-position": "error", |
| 326 | + "object-shorthand": "error", |
| 327 | + "one-var": [ |
| 328 | + "error", |
| 329 | + "never" |
| 330 | + ], |
| 331 | + "operator-assignment": "error", |
| 332 | + "operator-linebreak": [ |
| 333 | + "error", |
| 334 | + "before" |
| 335 | + ], |
| 336 | + "padded-blocks": [ |
| 337 | + "error", |
| 338 | + { |
| 339 | + "classes": "always", |
| 340 | + "switches": "never" |
| 341 | + } |
| 342 | + ], |
| 343 | + "prefer-regex-literals": "error", |
| 344 | + "prefer-template": "error", |
| 345 | + "radix": "error", |
| 346 | + "rest-spread-spacing": "error", |
| 347 | + "semi-spacing": "error", |
| 348 | + "semi-style": "error", |
| 349 | + "space-before-blocks": "error", |
| 350 | + "space-in-parens": "error", |
| 351 | + "space-unary-ops": "error", |
| 352 | + "symbol-description": "error", |
| 353 | + "template-curly-spacing": "error", |
| 354 | + "template-tag-spacing": "error", |
| 355 | + "valid-typeof": [ |
| 356 | + "error", |
| 357 | + { |
| 358 | + "requireStringLiterals": false |
| 359 | + } |
| 360 | + ], |
| 361 | + "yield-star-spacing": "error", |
| 362 | + "yoda": [ |
| 363 | + "error", |
| 364 | + "never", |
| 365 | + { |
| 366 | + "exceptRange": true |
| 367 | + } |
| 368 | + ] |
| 369 | + } |
| 370 | +} |
0 commit comments