|
| 1 | +module.exports = { |
| 2 | + root: true, |
| 3 | + env: { |
| 4 | + browser: false, |
| 5 | + node: true, |
| 6 | + es6: true |
| 7 | + }, |
| 8 | + extends: [ |
| 9 | + 'plugin:@typescript-eslint/recommended', |
| 10 | + 'plugin:@typescript-eslint/recommended-requiring-type-checking', |
| 11 | + 'plugin:import/typescript' |
| 12 | + ], |
| 13 | + parser: '@typescript-eslint/parser', |
| 14 | + parserOptions: { |
| 15 | + tsconfigRootDir: __dirname, |
| 16 | + project: ['./tsconfig.json'] |
| 17 | + }, |
| 18 | + plugins: ['@typescript-eslint', '@typescript-eslint/tslint', 'import'], |
| 19 | + settings: { |
| 20 | + 'import/resolver': 'webpack' |
| 21 | + }, |
| 22 | + rules: { |
| 23 | + '@typescript-eslint/no-inferrable-types': 'off', |
| 24 | + '@typescript-eslint/no-unnecessary-type-assertion': 'off', |
| 25 | + '@typescript-eslint/require-await': 'off', |
| 26 | + '@typescript-eslint/camelcase': 'off', |
| 27 | + '@typescript-eslint/explicit-function-return-type': 'off', |
| 28 | + '@typescript-eslint/adjacent-overload-signatures': 'error', |
| 29 | + '@typescript-eslint/array-type': 'error', |
| 30 | + '@typescript-eslint/class-name-casing': 'error', |
| 31 | + '@typescript-eslint/consistent-type-assertions': 'off', |
| 32 | + '@typescript-eslint/indent': ['off', 'tabs'], |
| 33 | + '@typescript-eslint/interface-name-prefix': 'error', |
| 34 | + '@typescript-eslint/member-ordering': 'error', |
| 35 | + '@typescript-eslint/no-empty-function': 'off', |
| 36 | + '@typescript-eslint/no-empty-interface': 'error', |
| 37 | + '@typescript-eslint/no-explicit-any': 'off', |
| 38 | + '@typescript-eslint/no-misused-new': 'error', |
| 39 | + '@typescript-eslint/no-namespace': 'error', |
| 40 | + '@typescript-eslint/no-parameter-properties': 'off', |
| 41 | + '@typescript-eslint/no-use-before-define': 'off', |
| 42 | + '@typescript-eslint/no-var-requires': 'error', |
| 43 | + '@typescript-eslint/prefer-for-of': 'error', |
| 44 | + '@typescript-eslint/prefer-function-type': 'error', |
| 45 | + '@typescript-eslint/prefer-namespace-keyword': 'error', |
| 46 | + '@typescript-eslint/no-misused-promises': 'off', |
| 47 | + '@typescript-eslint/prefer-includes': 'off', |
| 48 | + '@typescript-eslint/quotes': [ |
| 49 | + 'error', |
| 50 | + 'single', |
| 51 | + { allowTemplateLiterals: true, avoidEscape: true } |
| 52 | + ], |
| 53 | + '@typescript-eslint/triple-slash-reference': 'error', |
| 54 | + '@typescript-eslint/unified-signatures': 'error', |
| 55 | + 'arrow-parens': ['error', 'as-needed'], |
| 56 | + camelcase: 'off', |
| 57 | + 'comma-dangle': 'error', |
| 58 | + complexity: 'off', |
| 59 | + 'constructor-super': 'error', |
| 60 | + 'dot-notation': 'error', |
| 61 | + eqeqeq: ['error', 'smart'], |
| 62 | + 'guard-for-in': 'off', |
| 63 | + 'id-blacklist': 'off', |
| 64 | + 'id-match': 'off', |
| 65 | + 'import/order': 'off', |
| 66 | + 'max-classes-per-file': 'off', |
| 67 | + 'max-len': 'off', |
| 68 | + 'new-parens': 'error', |
| 69 | + 'no-bitwise': 'off', |
| 70 | + 'no-caller': 'error', |
| 71 | + 'no-console': 'error', |
| 72 | + 'no-debugger': 'error', |
| 73 | + 'no-eval': 'error', |
| 74 | + 'no-new-wrappers': 'error', |
| 75 | + 'no-throw-literal': 'error', |
| 76 | + 'no-trailing-spaces': 'error', |
| 77 | + 'no-undef-init': 'error', |
| 78 | + 'no-unsafe-finally': 'error', |
| 79 | + 'no-unused-expressions': 'error', |
| 80 | + 'no-unused-labels': 'error', |
| 81 | + 'no-var': 'error', |
| 82 | + 'object-shorthand': 'error', |
| 83 | + 'one-var': ['error', 'never'], |
| 84 | + 'prefer-arrow/prefer-arrow-functions': 'off', |
| 85 | + 'prefer-const': [ |
| 86 | + 'error', |
| 87 | + { |
| 88 | + destructuring: 'all' |
| 89 | + } |
| 90 | + ], |
| 91 | + 'quote-props': ['error', 'as-needed'], |
| 92 | + radix: 'off', |
| 93 | + 'space-before-function-paren': [ |
| 94 | + 'error', |
| 95 | + { |
| 96 | + anonymous: 'always', |
| 97 | + named: 'never', |
| 98 | + asyncArrow: 'always' |
| 99 | + } |
| 100 | + ], |
| 101 | + 'spaced-comment': ['off', 'never'], |
| 102 | + 'use-isnan': 'error', |
| 103 | + 'valid-typeof': 'off', |
| 104 | + '@typescript-eslint/tslint/config': [ |
| 105 | + 'error', |
| 106 | + { |
| 107 | + rules: { |
| 108 | + 'jsdoc-format': true, |
| 109 | + 'no-reference-import': true |
| 110 | + } |
| 111 | + } |
| 112 | + ], |
| 113 | + '@typescript-eslint/unbound-method': 'off', |
| 114 | + '@typescript-eslint/member-delimiter-style': [ |
| 115 | + 'error', |
| 116 | + { |
| 117 | + multiline: { |
| 118 | + delimiter: 'semi', |
| 119 | + requireLast: true |
| 120 | + }, |
| 121 | + singleline: { |
| 122 | + delimiter: 'semi', |
| 123 | + requireLast: false |
| 124 | + } |
| 125 | + } |
| 126 | + ], |
| 127 | + '@typescript-eslint/ban-ts-ignore': 'off', |
| 128 | + '@typescript-eslint/prefer-string-starts-ends-with': 'off', |
| 129 | + '@typescript-eslint/prefer-regexp-exec': 'off', |
| 130 | + 'no-unused-expressions': 'off', |
| 131 | + 'no-throw-literal': 'off', |
| 132 | + '@typescript-eslint/no-unused-vars': 'off', |
| 133 | + 'import/no-unresolved': [2, { ignore: ['squirejs'] }], |
| 134 | + 'import/no-cycle': [2, { maxDepth: 10 }], |
| 135 | + semi: ['error', 'always'] |
| 136 | + } |
| 137 | +}; |
0 commit comments