|
| 1 | +module.exports = { |
| 2 | + extends: ['plugin:prettier/recommended'], |
| 3 | + plugins: ['prettier', '@typescript-eslint'], |
| 4 | + parser: '@typescript-eslint/parser', |
| 5 | + parserOptions: { |
| 6 | + createDefaultProgram: true, |
| 7 | + project: './tsconfig.json', |
| 8 | + }, |
| 9 | + rules: { |
| 10 | + 'prettier/prettier': 'warn', |
| 11 | + '@typescript-eslint/adjacent-overload-signatures': 'error', |
| 12 | + '@typescript-eslint/array-type': 'error', |
| 13 | + '@typescript-eslint/await-thenable': 'error', |
| 14 | + '@typescript-eslint/ban-types': 'off', |
| 15 | + '@typescript-eslint/class-name-casing': 'off', |
| 16 | + '@typescript-eslint/consistent-type-assertions': 'error', |
| 17 | + '@typescript-eslint/consistent-type-definitions': 'error', |
| 18 | + '@typescript-eslint/explicit-member-accessibility': [ |
| 19 | + 'off', |
| 20 | + { |
| 21 | + accessibility: 'explicit', |
| 22 | + }, |
| 23 | + ], |
| 24 | + |
| 25 | + '@typescript-eslint/interface-name-prefix': 'off', |
| 26 | + '@typescript-eslint/member-delimiter-style': 'error', |
| 27 | + '@typescript-eslint/member-ordering': 'off', |
| 28 | + '@typescript-eslint/no-empty-function': 'off', |
| 29 | + '@typescript-eslint/no-empty-interface': 'off', |
| 30 | + '@typescript-eslint/no-explicit-any': 'off', |
| 31 | + '@typescript-eslint/no-floating-promises': 'off', |
| 32 | + '@typescript-eslint/no-inferrable-types': 'off', |
| 33 | + '@typescript-eslint/no-misused-new': 'off', |
| 34 | + '@typescript-eslint/no-namespace': 'off', |
| 35 | + '@typescript-eslint/no-parameter-properties': 'off', |
| 36 | + '@typescript-eslint/no-require-imports': 'off', |
| 37 | + '@typescript-eslint/no-unnecessary-qualifier': 'error', |
| 38 | + '@typescript-eslint/no-unnecessary-type-assertion': 'error', |
| 39 | + '@typescript-eslint/no-use-before-declare': 'off', |
| 40 | + '@typescript-eslint/no-var-requires': 'off', |
| 41 | + '@typescript-eslint/prefer-for-of': 'off', |
| 42 | + '@typescript-eslint/prefer-function-type': 'error', |
| 43 | + '@typescript-eslint/prefer-namespace-keyword': 'error', |
| 44 | + '@typescript-eslint/quotes': [ |
| 45 | + 'error', |
| 46 | + 'single', |
| 47 | + { |
| 48 | + avoidEscape: true, |
| 49 | + }, |
| 50 | + ], |
| 51 | + '@typescript-eslint/semi': ['error'], |
| 52 | + '@typescript-eslint/space-within-parens': ['off', 'never'], |
| 53 | + '@typescript-eslint/triple-slash-reference': 'off', |
| 54 | + '@typescript-eslint/type-annotation-spacing': 'error', |
| 55 | + '@typescript-eslint/unified-signatures': 'error', |
| 56 | + 'arrow-body-style': 'error', |
| 57 | + 'arrow-parens': ['off', 'as-needed'], |
| 58 | + camelcase: 'off', |
| 59 | + 'capitalized-comments': 'off', |
| 60 | + complexity: 'off', |
| 61 | + 'constructor-super': 'error', |
| 62 | + curly: ['error', 'multi-line'], |
| 63 | + 'dot-notation': 'off', |
| 64 | + 'eol-last': 'error', |
| 65 | + eqeqeq: ['error', 'smart'], |
| 66 | + 'guard-for-in': 'off', |
| 67 | + 'id-blacklist': ['error', 'any', 'string', 'boolean', 'Undefined'], |
| 68 | + 'id-match': 'error', |
| 69 | + 'sort-imports': [ |
| 70 | + 'error', |
| 71 | + { |
| 72 | + ignoreCase: false, |
| 73 | + ignoreDeclarationSort: true, |
| 74 | + ignoreMemberSort: false, |
| 75 | + memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'], |
| 76 | + }, |
| 77 | + ], |
| 78 | + 'linebreak-style': 'off', |
| 79 | + 'max-classes-per-file': 'off', |
| 80 | + 'max-len': [ |
| 81 | + 'off', |
| 82 | + { |
| 83 | + ignorePattern: '^import |^export {(.*?)}', |
| 84 | + code: 200, |
| 85 | + }, |
| 86 | + ], |
| 87 | + 'new-parens': 'off', |
| 88 | + 'newline-per-chained-call': 'off', |
| 89 | + 'no-bitwise': 'off', |
| 90 | + 'no-caller': 'error', |
| 91 | + 'no-cond-assign': 'off', |
| 92 | + 'no-console': [ |
| 93 | + 'off', |
| 94 | + { |
| 95 | + allow: [ |
| 96 | + 'log', |
| 97 | + 'warn', |
| 98 | + 'dir', |
| 99 | + 'timeLog', |
| 100 | + 'assert', |
| 101 | + 'clear', |
| 102 | + 'count', |
| 103 | + 'countReset', |
| 104 | + 'group', |
| 105 | + 'groupEnd', |
| 106 | + 'table', |
| 107 | + 'debug', |
| 108 | + 'dirxml', |
| 109 | + 'error', |
| 110 | + 'groupCollapsed', |
| 111 | + 'Console', |
| 112 | + 'profile', |
| 113 | + 'profileEnd', |
| 114 | + 'timeStamp', |
| 115 | + 'context', |
| 116 | + ], |
| 117 | + }, |
| 118 | + ], |
| 119 | + 'no-constant-condition': 'error', |
| 120 | + 'no-control-regex': 'off', |
| 121 | + 'no-debugger': 'error', |
| 122 | + 'no-duplicate-imports': 'error', |
| 123 | + 'no-empty': 'off', |
| 124 | + 'no-eval': 'off', |
| 125 | + 'no-extra-semi': 'off', |
| 126 | + 'no-fallthrough': 'error', |
| 127 | + 'no-invalid-regexp': 'error', |
| 128 | + 'no-invalid-this': 'off', |
| 129 | + 'no-irregular-whitespace': 'off', |
| 130 | + 'no-multiple-empty-lines': 'off', |
| 131 | + 'no-new-wrappers': 'error', |
| 132 | + 'no-redeclare': ['error', { builtinGlobals: false }], |
| 133 | + 'no-regex-spaces': 'error', |
| 134 | + 'no-return-await': 'error', |
| 135 | + 'no-shadow': [ |
| 136 | + 'off', |
| 137 | + { |
| 138 | + hoist: 'all', |
| 139 | + }, |
| 140 | + ], |
| 141 | + 'no-throw-literal': 'error', |
| 142 | + 'no-trailing-spaces': 'error', |
| 143 | + 'no-undef-init': 'error', |
| 144 | + 'no-underscore-dangle': 'off', |
| 145 | + 'no-unsafe-finally': 'error', |
| 146 | + 'no-unused-expressions': [ |
| 147 | + 'error', |
| 148 | + { |
| 149 | + allowTaggedTemplates: true, |
| 150 | + allowShortCircuit: true, |
| 151 | + }, |
| 152 | + ], |
| 153 | + 'no-unused-labels': 'error', |
| 154 | + 'no-var': 'error', |
| 155 | + 'object-shorthand': 'error', |
| 156 | + 'one-var': ['off', 'never'], |
| 157 | + 'prefer-arrow/prefer-arrow-functions': 'off', |
| 158 | + 'prefer-const': 'error', |
| 159 | + 'quote-props': 'off', |
| 160 | + radix: 'error', |
| 161 | + 'space-before-function-paren': 'off', |
| 162 | + 'use-isnan': 'error', |
| 163 | + 'valid-typeof': 'off', |
| 164 | + }, |
| 165 | +}; |
0 commit comments