|
| 1 | +{ |
| 2 | + "root": true, |
| 3 | + "env": { |
| 4 | + "browser": true, |
| 5 | + "es6": true, |
| 6 | + "node": true |
| 7 | + }, |
| 8 | + "settings": { |
| 9 | + "import/resolver": { |
| 10 | + "typescript": { |
| 11 | + "alwaysTryTypes": true, |
| 12 | + "project": "./tsconfig.json" |
| 13 | + } |
| 14 | + } |
| 15 | + }, |
| 16 | + "parserOptions": { |
| 17 | + "ecmaVersion": "latest", |
| 18 | + "project": "./tsconfig.json", |
| 19 | + "sourceType": "module" |
| 20 | + }, |
| 21 | + "plugins": [ |
| 22 | + "@typescript-eslint", |
| 23 | + "eslint-plugin-import", |
| 24 | + "eslint-plugin-jsdoc", |
| 25 | + "etc" |
| 26 | + ], |
| 27 | + "extends": [ |
| 28 | + "eslint:recommended", |
| 29 | + "plugin:@typescript-eslint/recommended", |
| 30 | + "plugin:@typescript-eslint/recommended-requiring-type-checking", |
| 31 | + "plugin:etc/recommended", |
| 32 | + "plugin:import/typescript" |
| 33 | + ], |
| 34 | + "overrides": [{ |
| 35 | + "files": "*.ts?(x)", |
| 36 | + "parser": "@typescript-eslint/parser" |
| 37 | + }, { |
| 38 | + "files": "*.test.ts?(x)", |
| 39 | + "rules": { |
| 40 | + "@typescript-eslint/no-non-null-assertion": "off", |
| 41 | + "@typescript-eslint/restrict-template-expressions": "off", |
| 42 | + "etc/throw-error": "off" |
| 43 | + } |
| 44 | + }, { |
| 45 | + "files": "*.typetest.ts?(x)", |
| 46 | + "rules": { |
| 47 | + "@typescript-eslint/ban-ts-comment": ["error", { "ts-expect-error": false }], |
| 48 | + "etc/throw-error": "off" |
| 49 | + } |
| 50 | + }, { |
| 51 | + "files": "*.js?(x)", |
| 52 | + "rules": { |
| 53 | + "@typescript-eslint/explicit-function-return-type": "off", |
| 54 | + "@typescript-eslint/explicit-member-accessibility": "off", |
| 55 | + "@typescript-eslint/explicit-module-boundary-types": "off", |
| 56 | + "@typescript-eslint/no-unsafe-argument": "off", |
| 57 | + "@typescript-eslint/no-unsafe-assignment": "off", |
| 58 | + "@typescript-eslint/no-unsafe-member-access": "off", |
| 59 | + "@typescript-eslint/no-unsafe-call": "off", |
| 60 | + "@typescript-eslint/no-unsafe-return": "off", |
| 61 | + "@typescript-eslint/no-var-requires": "off", |
| 62 | + "@typescript-eslint/restrict-plus-operands": "off", |
| 63 | + "@typescript-eslint/restrict-template-expressions": "off" |
| 64 | + } |
| 65 | + }], |
| 66 | + "rules": { |
| 67 | + "@typescript-eslint/ban-types": "error", |
| 68 | + "@typescript-eslint/comma-dangle": ["error", "always-multiline"], |
| 69 | + "@typescript-eslint/consistent-type-assertions": "error", |
| 70 | + "@typescript-eslint/dot-notation": "error", |
| 71 | + "@typescript-eslint/explicit-function-return-type": ["error", { "allowExpressions": true }], |
| 72 | + "@typescript-eslint/explicit-member-accessibility": "error", |
| 73 | + "@typescript-eslint/explicit-module-boundary-types": "error", |
| 74 | + "@typescript-eslint/member-ordering": ["error", { |
| 75 | + "classes": [ |
| 76 | + "static-field", |
| 77 | + "field", |
| 78 | + "constructor", |
| 79 | + "static-method", |
| 80 | + "abstract-method", |
| 81 | + "protected-method", |
| 82 | + "private-method", |
| 83 | + "public-method" |
| 84 | + ], |
| 85 | + "interfaces": { "order": "alphabetically" }, |
| 86 | + "typeLiterals": { "order": "alphabetically" } |
| 87 | + }], |
| 88 | + "@typescript-eslint/member-delimiter-style": ["error", { |
| 89 | + "multiline": { |
| 90 | + "delimiter": "semi", |
| 91 | + "requireLast": true |
| 92 | + }, |
| 93 | + "singleline": { |
| 94 | + "delimiter": "semi", |
| 95 | + "requireLast": true |
| 96 | + } |
| 97 | + }], |
| 98 | + "@typescript-eslint/no-empty-function": "error", |
| 99 | + "@typescript-eslint/no-empty-interface": "error", |
| 100 | + "@typescript-eslint/no-explicit-any": ["error", { "ignoreRestArgs": true }], |
| 101 | + "@typescript-eslint/no-floating-promises": "off", |
| 102 | + "@typescript-eslint/no-inferrable-types": ["error", { |
| 103 | + "ignoreParameters": true, |
| 104 | + "ignoreProperties": true |
| 105 | + }], |
| 106 | + "@typescript-eslint/no-misused-new": "error", |
| 107 | + "@typescript-eslint/no-namespace": "off", |
| 108 | + "@typescript-eslint/no-non-null-assertion": "error", |
| 109 | + "@typescript-eslint/no-redundant-type-constituents": "error", |
| 110 | + "@typescript-eslint/no-shadow": ["error", { "hoist": "all" }], |
| 111 | + "@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }], |
| 112 | + "@typescript-eslint/no-unused-vars": ["error", { |
| 113 | + "destructuredArrayIgnorePattern": "^_", |
| 114 | + "ignoreRestSiblings": true |
| 115 | + }], |
| 116 | + "@typescript-eslint/no-use-before-define": ["error", { |
| 117 | + "functions": false, |
| 118 | + "classes": false |
| 119 | + }], |
| 120 | + "@typescript-eslint/no-var-requires": "error", |
| 121 | + "@typescript-eslint/parameter-properties": "error", |
| 122 | + "@typescript-eslint/prefer-for-of": "error", |
| 123 | + "@typescript-eslint/prefer-function-type": "error", |
| 124 | + "@typescript-eslint/prefer-namespace-keyword": "error", |
| 125 | + "@typescript-eslint/quotes": ["error", "double", { |
| 126 | + "avoidEscape": true, |
| 127 | + "allowTemplateLiterals": false |
| 128 | + }], |
| 129 | + "@typescript-eslint/restrict-template-expressions": ["error", { |
| 130 | + "allowNumber": true, |
| 131 | + "allowBoolean": true, |
| 132 | + "allowNullish": true |
| 133 | + }], |
| 134 | + "@typescript-eslint/semi": "error", |
| 135 | + "@typescript-eslint/space-infix-ops": "error", |
| 136 | + "@typescript-eslint/triple-slash-reference": "error", |
| 137 | + "@typescript-eslint/type-annotation-spacing": "error", |
| 138 | + "@typescript-eslint/unbound-method": ["error", { "ignoreStatic": true }], |
| 139 | + "@typescript-eslint/unified-signatures": "error", |
| 140 | + "array-bracket-spacing": "error", |
| 141 | + "arrow-parens": ["error", "as-needed"], |
| 142 | + "arrow-spacing": "error", |
| 143 | + "brace-style": "error", |
| 144 | + "camelcase": "error", |
| 145 | + "comma-spacing": "error", |
| 146 | + "computed-property-spacing": "error", |
| 147 | + "constructor-super": "error", |
| 148 | + "curly": "error", |
| 149 | + "etc/no-commented-out-code": "error", |
| 150 | + "etc/throw-error": "error", |
| 151 | + "eol-last": "error", |
| 152 | + "eqeqeq": "error", |
| 153 | + "func-style": ["error", "declaration", { "allowArrowFunctions": true }], |
| 154 | + "import/newline-after-import": "error", |
| 155 | + "import/no-absolute-path": "error", |
| 156 | + "import/no-cycle": ["error", { "ignoreExternal": true }], |
| 157 | + "import/no-duplicates": "error", |
| 158 | + "import/no-import-module-exports": "error", |
| 159 | + "import/no-namespace": "error", |
| 160 | + "import/no-relative-packages": "error", |
| 161 | + "import/no-unresolved": "error", |
| 162 | + "import/no-useless-path-segments": "error", |
| 163 | + "import/order": ["error", { |
| 164 | + "alphabetize": { |
| 165 | + "caseInsensitive": false, |
| 166 | + "order": "asc" |
| 167 | + }, |
| 168 | + "newlines-between": "always", |
| 169 | + "groups": ["external", "parent", "sibling"] |
| 170 | + }], |
| 171 | + "jsdoc/check-alignment": "error", |
| 172 | + "jsdoc/check-indentation": ["error", { "excludeTags": ["example", "param", "returns"] }], |
| 173 | + "jsdoc/newline-after-description": "error", |
| 174 | + "jsx-quotes": "error", |
| 175 | + "keyword-spacing": "error", |
| 176 | + "linebreak-style": "error", |
| 177 | + "max-classes-per-file": ["error", 1], |
| 178 | + "max-len": ["error", { |
| 179 | + "code": 120, |
| 180 | + "comments": 80, |
| 181 | + "ignoreRegExpLiterals": true, |
| 182 | + "ignorePattern": "^import (\\{ )?\\w+( \\})? from \".+\";$", |
| 183 | + "ignoreUrls": true, |
| 184 | + "tabWidth": 2 |
| 185 | + }], |
| 186 | + "new-parens": "error", |
| 187 | + "no-caller": "error", |
| 188 | + "no-cond-assign": "error", |
| 189 | + "no-console": "error", |
| 190 | + "no-duplicate-imports": "error", |
| 191 | + "no-empty-function": "error", |
| 192 | + "no-eval": "error", |
| 193 | + "no-extra-boolean-cast": ["error", { "enforceForLogicalOperands": true }], |
| 194 | + "no-invalid-this": "error", |
| 195 | + "no-labels": "error", |
| 196 | + "no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0, "maxBOF": 0 }], |
| 197 | + "no-multi-spaces": "error", |
| 198 | + "no-new-wrappers": "error", |
| 199 | + "no-param-reassign": "error", |
| 200 | + "no-tabs": "error", |
| 201 | + "no-throw-literal": "error", |
| 202 | + "no-trailing-spaces": "error", |
| 203 | + "no-underscore-dangle": "error", |
| 204 | + "no-use-before-define": "off", |
| 205 | + "no-useless-computed-key": ["error", { "enforceForClassMembers": true }], |
| 206 | + "no-var": "error", |
| 207 | + "object-curly-spacing": ["error", "always"], |
| 208 | + "object-shorthand": "error", |
| 209 | + "one-var": ["error", "never"], |
| 210 | + "prefer-const": "error", |
| 211 | + "quote-props": ["error", "as-needed"], |
| 212 | + "radix": "error", |
| 213 | + "rest-spread-spacing": "error", |
| 214 | + "semi-spacing": "error", |
| 215 | + "sort-keys": "error", |
| 216 | + "space-before-blocks": "error", |
| 217 | + "space-in-parens": "error", |
| 218 | + "spaced-comment": "error", |
| 219 | + "switch-colon-spacing": "error" |
| 220 | + } |
| 221 | +} |
0 commit comments