|
| 1 | +module.exports = { |
| 2 | + parser: '@typescript-eslint/parser', |
| 3 | + parserOptions: { |
| 4 | + project: 'tsconfig.json', |
| 5 | + sourceType: 'module', |
| 6 | + }, |
| 7 | + plugins: [ |
| 8 | + '@typescript-eslint/eslint-plugin', |
| 9 | + 'prettier', |
| 10 | + 'import', |
| 11 | + ], |
| 12 | + extends: [ |
| 13 | + "eslint:all", |
| 14 | + 'plugin:@typescript-eslint/all', |
| 15 | + 'prettier', |
| 16 | + 'prettier/@typescript-eslint', |
| 17 | + ], |
| 18 | + root: true, |
| 19 | + env: { |
| 20 | + es6: true, |
| 21 | + node: true, |
| 22 | + jest: true, |
| 23 | + }, |
| 24 | + rules: { |
| 25 | + "array-bracket-newline": [ |
| 26 | + "error", |
| 27 | + "consistent" |
| 28 | + ], |
| 29 | + "array-element-newline": [ |
| 30 | + "error", |
| 31 | + "consistent" |
| 32 | + ], |
| 33 | + "arrow-parens": [ |
| 34 | + "error", |
| 35 | + "as-needed" |
| 36 | + ], |
| 37 | + "class-methods-use-this": "off", |
| 38 | + "capitalized-comments": "off", |
| 39 | + "comma-dangle": [ |
| 40 | + "error", |
| 41 | + "always-multiline" |
| 42 | + ], |
| 43 | + "dot-location": [ |
| 44 | + "error", |
| 45 | + "property" |
| 46 | + ], |
| 47 | + "func-names": [ |
| 48 | + "error", |
| 49 | + "as-needed" |
| 50 | + ], |
| 51 | + "id-length": "off", |
| 52 | + "implicit-arrow-linebreak": "off", |
| 53 | + "init-declarations": "off", |
| 54 | + "max-len": [ |
| 55 | + "error", |
| 56 | + 120 |
| 57 | + ], |
| 58 | + "max-lines": "off", |
| 59 | + "max-lines-per-function": "off", |
| 60 | + "max-params": "off", |
| 61 | + "max-statements": "off", |
| 62 | + "multiline-comment-style": "off", |
| 63 | + "multiline-ternary": [ |
| 64 | + "error", |
| 65 | + "always-multiline" |
| 66 | + ], |
| 67 | + "newline-per-chained-call": [ |
| 68 | + "error", |
| 69 | + { |
| 70 | + "ignoreChainWithDepth": 2 |
| 71 | + } |
| 72 | + ], |
| 73 | + "no-await-in-loop": "off", |
| 74 | + "no-bitwise": "off", |
| 75 | + "no-confusing-arrow": "off", |
| 76 | + "no-constant-condition": [ |
| 77 | + "error", |
| 78 | + { |
| 79 | + "checkLoops": false |
| 80 | + } |
| 81 | + ], |
| 82 | + "no-continue": "off", |
| 83 | + "no-duplicate-imports": "off", |
| 84 | + "no-param-reassign": "off", |
| 85 | + "no-underscore-dangle": "off", |
| 86 | + "import/no-duplicates": [ |
| 87 | + "error", |
| 88 | + { |
| 89 | + "considerQueryString": true |
| 90 | + } |
| 91 | + ], |
| 92 | + "no-empty": "off", |
| 93 | + "no-implicit-coercion": "off", |
| 94 | + "no-invalid-this": "off", |
| 95 | + "no-mixed-operators": "off", |
| 96 | + "no-multiple-empty-lines": [ |
| 97 | + "error", |
| 98 | + { |
| 99 | + "max": 2, |
| 100 | + "maxEOF": 1 |
| 101 | + } |
| 102 | + ], |
| 103 | + "no-plusplus": [ |
| 104 | + "error", |
| 105 | + { |
| 106 | + "allowForLoopAfterthoughts": true |
| 107 | + } |
| 108 | + ], |
| 109 | + "no-process-env": "off", |
| 110 | + "no-shadow": "off", |
| 111 | + "no-ternary": "off", |
| 112 | + "no-unused-expressions": "off", |
| 113 | + "no-warning-comments": "off", |
| 114 | + "new-cap": "off", |
| 115 | + "one-var": [ |
| 116 | + "error", |
| 117 | + "never" |
| 118 | + ], |
| 119 | + "padded-blocks": [ |
| 120 | + "error", |
| 121 | + "never" |
| 122 | + ], |
| 123 | + "padding-line-between-statements": [ |
| 124 | + "error", |
| 125 | + { |
| 126 | + "blankLine": "always", |
| 127 | + "prev": [ |
| 128 | + "const", |
| 129 | + "let", |
| 130 | + "var" |
| 131 | + ], |
| 132 | + "next": "*" |
| 133 | + }, |
| 134 | + { |
| 135 | + "blankLine": "always", |
| 136 | + "prev": "*", |
| 137 | + "next": [ |
| 138 | + "const", |
| 139 | + "let", |
| 140 | + "var" |
| 141 | + ] |
| 142 | + }, |
| 143 | + { |
| 144 | + "blankLine": "any", |
| 145 | + "prev": [ |
| 146 | + "const", |
| 147 | + "let", |
| 148 | + "var" |
| 149 | + ], |
| 150 | + "next": [ |
| 151 | + "const", |
| 152 | + "let", |
| 153 | + "var" |
| 154 | + ] |
| 155 | + }, |
| 156 | + { |
| 157 | + "blankLine": "always", |
| 158 | + "prev": "*", |
| 159 | + "next": "return" |
| 160 | + }, |
| 161 | + { |
| 162 | + "blankLine": "always", |
| 163 | + "prev": "block-like", |
| 164 | + "next": "*" |
| 165 | + }, |
| 166 | + { |
| 167 | + "blankLine": "always", |
| 168 | + "prev": "*", |
| 169 | + "next": "block-like" |
| 170 | + } |
| 171 | + ], |
| 172 | + "prefer-destructuring": "off", |
| 173 | + "quote-props": [ |
| 174 | + "error", |
| 175 | + "as-needed" |
| 176 | + ], |
| 177 | + "quotes": [ |
| 178 | + "error", |
| 179 | + "single", |
| 180 | + { |
| 181 | + "avoidEscape": true |
| 182 | + } |
| 183 | + ], |
| 184 | + "object-curly-spacing": [ |
| 185 | + "error", |
| 186 | + "always" |
| 187 | + ], |
| 188 | + "require-atomic-updates": "off", |
| 189 | + "require-unicode-regexp": "off", |
| 190 | + "semi": "off", |
| 191 | + "sort-imports": "off", |
| 192 | + "sort-keys": "off", |
| 193 | + "wrap-regex": "off", |
| 194 | + "import/default": "off", |
| 195 | + |
| 196 | + "@typescript-eslint/explicit-function-return-type": "off", |
| 197 | + "@typescript-eslint/explicit-member-accessibility": [ |
| 198 | + "error", |
| 199 | + { |
| 200 | + "accessibility": "no-public" |
| 201 | + } |
| 202 | + ], |
| 203 | + "@typescript-eslint/explicit-module-boundary-types": "off", |
| 204 | + "@typescript-eslint/generic-type-naming": "off", |
| 205 | + "@typescript-eslint/init-declarations": "off", |
| 206 | + "@typescript-eslint/naming-convention": "off", |
| 207 | + "@typescript-eslint/no-dynamic-delete": "off", |
| 208 | + "@typescript-eslint/no-empty-function": "off", |
| 209 | + "@typescript-eslint/no-explicit-any": "off", |
| 210 | + "@typescript-eslint/no-extraneous-class": [ |
| 211 | + "error", |
| 212 | + { |
| 213 | + "allowWithDecorator": true |
| 214 | + } |
| 215 | + ], |
| 216 | + "@typescript-eslint/no-invalid-this": "off", |
| 217 | + "@typescript-eslint/no-invalid-void-type": "off", |
| 218 | + "@typescript-eslint/no-magic-numbers": "off", |
| 219 | + "@typescript-eslint/no-misused-promises": "off", |
| 220 | + "@typescript-eslint/no-parameter-properties": "off", |
| 221 | + "@typescript-eslint/no-throw-literal": "off", |
| 222 | + "@typescript-eslint/no-type-alias": "off", |
| 223 | + "@typescript-eslint/no-unnecessary-condition": "off", |
| 224 | + "@typescript-eslint/no-unsafe-assignment": "off", |
| 225 | + "@typescript-eslint/no-unused-expressions": "off", |
| 226 | + "@typescript-eslint/no-unused-vars": [ |
| 227 | + "error", |
| 228 | + { |
| 229 | + "argsIgnorePattern": "^_$", |
| 230 | + "varsIgnorePattern": "^_$", |
| 231 | + "ignoreRestSiblings": true |
| 232 | + } |
| 233 | + ], |
| 234 | + "@typescript-eslint/prefer-nullish-coalescing": "off", |
| 235 | + "@typescript-eslint/prefer-readonly-parameter-types": "off", |
| 236 | + "@typescript-eslint/promise-function-async": "off", |
| 237 | + "@typescript-eslint/restrict-template-expressions": [ |
| 238 | + "warn", |
| 239 | + { |
| 240 | + "allowNumber": true |
| 241 | + } |
| 242 | + ], |
| 243 | + "@typescript-eslint/semi": "error", |
| 244 | + "@typescript-eslint/strict-boolean-expressions": "off", |
| 245 | + "@typescript-eslint/typedef": "off", |
| 246 | + "prettier/prettier": "error" |
| 247 | + }, |
| 248 | +}; |
0 commit comments