|
| 1 | +module.exports = { |
| 2 | + env: { |
| 3 | + node: true, |
| 4 | + es6: true, |
| 5 | + }, |
| 6 | + extends: ['plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended-requiring-type-checking', 'prettier', 'prettier/@typescript-eslint'], |
| 7 | + parser: '@typescript-eslint/parser', |
| 8 | + parserOptions: { |
| 9 | + project: ['./packages/**/tsconfig.json', './tests/tsconfig.json'], |
| 10 | + sourceType: 'module', |
| 11 | + }, |
| 12 | + plugins: ['@typescript-eslint'], |
| 13 | + rules: { |
| 14 | + '@typescript-eslint/adjacent-overload-signatures': 'error', |
| 15 | + '@typescript-eslint/array-type': [ |
| 16 | + 'error', |
| 17 | + { |
| 18 | + default: 'array-simple', |
| 19 | + }, |
| 20 | + ], |
| 21 | + '@typescript-eslint/await-thenable': 'error', |
| 22 | + '@typescript-eslint/ban-ts-comment': 'error', |
| 23 | + '@typescript-eslint/ban-types': 'off', |
| 24 | + '@typescript-eslint/consistent-type-assertions': 'error', |
| 25 | + '@typescript-eslint/dot-notation': 'error', |
| 26 | + '@typescript-eslint/explicit-module-boundary-types': 'off', |
| 27 | + '@typescript-eslint/member-delimiter-style': [ |
| 28 | + 'off', |
| 29 | + { |
| 30 | + multiline: { |
| 31 | + delimiter: 'none', |
| 32 | + requireLast: true, |
| 33 | + }, |
| 34 | + singleline: { |
| 35 | + delimiter: 'semi', |
| 36 | + requireLast: false, |
| 37 | + }, |
| 38 | + }, |
| 39 | + ], |
| 40 | + '@typescript-eslint/member-ordering': 'off', |
| 41 | + '@typescript-eslint/naming-convention': 'off', |
| 42 | + '@typescript-eslint/no-array-constructor': 'error', |
| 43 | + '@typescript-eslint/no-empty-function': 'error', |
| 44 | + '@typescript-eslint/no-empty-interface': 'error', |
| 45 | + '@typescript-eslint/no-explicit-any': 'off', |
| 46 | + '@typescript-eslint/no-extra-non-null-assertion': 'error', |
| 47 | + '@typescript-eslint/no-extra-semi': 'error', |
| 48 | + '@typescript-eslint/no-floating-promises': ['error', { ignoreVoid: true }], |
| 49 | + '@typescript-eslint/no-for-in-array': 'error', |
| 50 | + '@typescript-eslint/no-implied-eval': 'error', |
| 51 | + '@typescript-eslint/no-inferrable-types': 'error', |
| 52 | + '@typescript-eslint/no-misused-new': 'error', |
| 53 | + '@typescript-eslint/no-misused-promises': 'error', |
| 54 | + '@typescript-eslint/no-namespace': 'off', |
| 55 | + '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', |
| 56 | + '@typescript-eslint/no-non-null-assertion': 'off', |
| 57 | + '@typescript-eslint/no-parameter-properties': 'off', |
| 58 | + '@typescript-eslint/no-this-alias': 'error', |
| 59 | + '@typescript-eslint/no-unnecessary-type-assertion': 'error', |
| 60 | + '@typescript-eslint/no-unsafe-assignment': 'off', |
| 61 | + '@typescript-eslint/no-unsafe-call': 'off', |
| 62 | + '@typescript-eslint/no-unsafe-member-access': 'off', |
| 63 | + '@typescript-eslint/no-unsafe-return': 'off', |
| 64 | + '@typescript-eslint/no-unused-expressions': 'off', |
| 65 | + '@typescript-eslint/no-unused-vars': [ |
| 66 | + 'warn', |
| 67 | + { |
| 68 | + argsIgnorePattern: '^_', |
| 69 | + }, |
| 70 | + ], |
| 71 | + '@typescript-eslint/no-use-before-define': 'off', |
| 72 | + '@typescript-eslint/no-var-requires': 'off', |
| 73 | + '@typescript-eslint/prefer-as-const': 'error', |
| 74 | + '@typescript-eslint/prefer-for-of': 'error', |
| 75 | + '@typescript-eslint/prefer-function-type': 'error', |
| 76 | + '@typescript-eslint/prefer-namespace-keyword': 'error', |
| 77 | + '@typescript-eslint/prefer-regexp-exec': 'error', |
| 78 | + '@typescript-eslint/require-await': 'error', |
| 79 | + '@typescript-eslint/restrict-plus-operands': 'error', |
| 80 | + '@typescript-eslint/restrict-template-expressions': 'error', |
| 81 | + '@typescript-eslint/semi': ['off', null], |
| 82 | + '@typescript-eslint/triple-slash-reference': [ |
| 83 | + 'off', |
| 84 | + { |
| 85 | + path: 'always', |
| 86 | + types: 'prefer-import', |
| 87 | + lib: 'always', |
| 88 | + }, |
| 89 | + ], |
| 90 | + '@typescript-eslint/unbound-method': 'error', |
| 91 | + '@typescript-eslint/unified-signatures': 'error', |
| 92 | + 'arrow-parens': ['off', 'always'], |
| 93 | + complexity: 'off', |
| 94 | + 'constructor-super': 'error', |
| 95 | + eqeqeq: ['error', 'smart'], |
| 96 | + 'guard-for-in': 'error', |
| 97 | + 'id-match': 'error', |
| 98 | + 'max-classes-per-file': 'off', |
| 99 | + 'new-parens': 'error', |
| 100 | + 'no-array-constructor': 'off', |
| 101 | + 'no-bitwise': 'error', |
| 102 | + 'no-caller': 'error', |
| 103 | + 'no-cond-assign': 'error', |
| 104 | + 'no-console': 'error', |
| 105 | + 'no-debugger': 'error', |
| 106 | + 'no-empty': 'error', |
| 107 | + 'no-empty-function': 'off', |
| 108 | + 'no-eval': 'error', |
| 109 | + 'no-fallthrough': 'off', |
| 110 | + 'no-invalid-this': 'off', |
| 111 | + 'no-new-wrappers': 'error', |
| 112 | + 'no-shadow': [ |
| 113 | + 'off', |
| 114 | + { |
| 115 | + hoist: 'all', |
| 116 | + }, |
| 117 | + ], |
| 118 | + 'no-throw-literal': 'error', |
| 119 | + 'no-trailing-spaces': 'error', |
| 120 | + 'no-undef-init': 'error', |
| 121 | + 'no-underscore-dangle': 'error', |
| 122 | + 'no-unsafe-finally': 'error', |
| 123 | + 'no-unused-labels': 'error', |
| 124 | + 'no-unused-vars': 'off', |
| 125 | + 'no-var': 'error', |
| 126 | + 'object-shorthand': 'error', |
| 127 | + 'one-var': ['error', 'never'], |
| 128 | + 'prefer-const': 'error', |
| 129 | + radix: 'error', |
| 130 | + 'require-await': 'off', |
| 131 | + 'spaced-comment': [ |
| 132 | + 'error', |
| 133 | + 'always', |
| 134 | + { |
| 135 | + markers: ['/'], |
| 136 | + }, |
| 137 | + ], |
| 138 | + 'use-isnan': 'error', |
| 139 | + 'valid-typeof': 'off', |
| 140 | + }, |
| 141 | + overrides: [ |
| 142 | + { |
| 143 | + files: './packages/runtime/src/decorators/*.ts', |
| 144 | + rules: { |
| 145 | + '@typescript-eslint/no-unused-vars': 'off', |
| 146 | + }, |
| 147 | + }, |
| 148 | + { |
| 149 | + files: './tests/**/*.ts', |
| 150 | + rules: { |
| 151 | + '@typescript-eslint/no-unused-vars': 'off', |
| 152 | + '@typescript-eslint/no-floating-promises': 'off', |
| 153 | + '@typescript-eslint/restrict-template-expressions': 'off', |
| 154 | + }, |
| 155 | + }, |
| 156 | + ], |
| 157 | +}; |
0 commit comments