|
| 1 | +/* |
| 2 | +👋 Hi! This file was autogenerated by tslint-to-eslint-config. |
| 3 | +https://github.com/typescript-eslint/tslint-to-eslint-config |
| 4 | +
|
| 5 | +It represents the closest reasonable ESLint configuration to this |
| 6 | +project's original TSLint configuration. |
| 7 | +
|
| 8 | +We recommend eventually switching this configuration to extend from |
| 9 | +the recommended rulesets in typescript-eslint. |
| 10 | +https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md |
| 11 | +
|
| 12 | +Happy linting! 💖 |
| 13 | +*/ |
| 14 | +module.exports = { |
| 15 | + env: { |
| 16 | + browser: true, |
| 17 | + node: true, |
| 18 | + commonjs: true, |
| 19 | + es6: true |
| 20 | + }, |
| 21 | + extends: [ |
| 22 | + 'plugin:@typescript-eslint/recommended', |
| 23 | + 'plugin:@typescript-eslint/recommended-requiring-type-checking', |
| 24 | + 'prettier', |
| 25 | + 'plugin:prettier/recommended' |
| 26 | + ], |
| 27 | + parser: '@typescript-eslint/parser', |
| 28 | + parserOptions: { |
| 29 | + project: 'tsconfig.json', |
| 30 | + sourceType: 'module' |
| 31 | + }, |
| 32 | + plugins: [ |
| 33 | + 'eslint-plugin-import', |
| 34 | + 'eslint-plugin-jsdoc', |
| 35 | + 'eslint-plugin-prefer-arrow', |
| 36 | + '@typescript-eslint' |
| 37 | + ], |
| 38 | + rules: { |
| 39 | + 'prettier/prettier': 'error', |
| 40 | + '@typescript-eslint/adjacent-overload-signatures': 'error', |
| 41 | + '@typescript-eslint/array-type': [ |
| 42 | + 'error', |
| 43 | + { |
| 44 | + default: 'generic' |
| 45 | + } |
| 46 | + ], |
| 47 | + '@typescript-eslint/ban-types': 'off', |
| 48 | + '@typescript-eslint/consistent-type-assertions': 'error', |
| 49 | + '@typescript-eslint/consistent-type-definitions': 'error', |
| 50 | + '@typescript-eslint/dot-notation': 'off', |
| 51 | + '@typescript-eslint/explicit-member-accessibility': [ |
| 52 | + 'off', |
| 53 | + { |
| 54 | + accessibility: 'explicit' |
| 55 | + } |
| 56 | + ], |
| 57 | + '@typescript-eslint/indent': 'off', |
| 58 | + '@typescript-eslint/member-delimiter-style': [ |
| 59 | + 'error', |
| 60 | + { |
| 61 | + multiline: { |
| 62 | + delimiter: 'semi', |
| 63 | + requireLast: true |
| 64 | + }, |
| 65 | + singleline: { |
| 66 | + delimiter: 'semi', |
| 67 | + requireLast: false |
| 68 | + } |
| 69 | + } |
| 70 | + ], |
| 71 | + '@typescript-eslint/member-ordering': 'error', |
| 72 | + '@typescript-eslint/naming-convention': [ |
| 73 | + 'error', |
| 74 | + { |
| 75 | + selector: ['property', 'parameterProperty'], |
| 76 | + modifiers: ['private'], |
| 77 | + leadingUnderscore: 'require', |
| 78 | + format: ['camelCase'] |
| 79 | + }, |
| 80 | + { |
| 81 | + selector: ['property', 'parameterProperty'], |
| 82 | + modifiers: ['protected'], |
| 83 | + format: ['camelCase'] |
| 84 | + }, |
| 85 | + { selector: 'method', format: ['camelCase'] }, |
| 86 | + { selector: 'class', format: ['PascalCase'] } |
| 87 | + ], |
| 88 | + '@typescript-eslint/no-empty-function': 'off', |
| 89 | + '@typescript-eslint/no-empty-interface': 'error', |
| 90 | + '@typescript-eslint/no-explicit-any': 'off', |
| 91 | + '@typescript-eslint/no-inferrable-types': [ |
| 92 | + 'error', |
| 93 | + { |
| 94 | + ignoreParameters: true |
| 95 | + } |
| 96 | + ], |
| 97 | + '@typescript-eslint/no-misused-new': 'error', |
| 98 | + '@typescript-eslint/no-namespace': 'error', |
| 99 | + '@typescript-eslint/no-non-null-assertion': 'error', |
| 100 | + '@typescript-eslint/no-parameter-properties': 'off', |
| 101 | + '@typescript-eslint/restrict-template-expressions': 'off', |
| 102 | + '@typescript-eslint/no-shadow': [ |
| 103 | + 'error', |
| 104 | + { |
| 105 | + hoist: 'all' |
| 106 | + } |
| 107 | + ], |
| 108 | + '@typescript-eslint/no-unnecessary-type-assertion': 'error', |
| 109 | + '@typescript-eslint/no-unused-expressions': 'error', |
| 110 | + '@typescript-eslint/no-use-before-define': 'off', |
| 111 | + '@typescript-eslint/no-var-requires': 'error', |
| 112 | + '@typescript-eslint/prefer-for-of': 'error', |
| 113 | + '@typescript-eslint/prefer-function-type': 'error', |
| 114 | + '@typescript-eslint/prefer-namespace-keyword': 'error', |
| 115 | + '@typescript-eslint/prefer-readonly': 'error', |
| 116 | + '@typescript-eslint/no-unsafe-member-access': 'off', |
| 117 | + '@typescript-eslint/no-unsafe-assignment': 'off', |
| 118 | + '@typescript-eslint/no-unsafe-return': 'off', |
| 119 | + '@typescript-eslint/no-unsafe-call': 'off', |
| 120 | + '@typescript-eslint/explicit-module-boundary-types': 'off', |
| 121 | + '@typescript-eslint/semi': ['error', 'always'], |
| 122 | + '@typescript-eslint/triple-slash-reference': [ |
| 123 | + 'error', |
| 124 | + { |
| 125 | + path: 'always', |
| 126 | + types: 'prefer-import', |
| 127 | + lib: 'always' |
| 128 | + } |
| 129 | + ], |
| 130 | + '@typescript-eslint/type-annotation-spacing': 'error', |
| 131 | + '@typescript-eslint/unified-signatures': 'error', |
| 132 | + 'arrow-body-style': 'error', |
| 133 | + 'arrow-parens': ['off', 'always'], |
| 134 | + 'brace-style': ['error', '1tbs'], |
| 135 | + 'comma-dangle': [ |
| 136 | + 'error', |
| 137 | + { |
| 138 | + objects: 'never', |
| 139 | + arrays: 'never', |
| 140 | + functions: 'never' |
| 141 | + } |
| 142 | + ], |
| 143 | + complexity: 'off', |
| 144 | + 'constructor-super': 'error', |
| 145 | + curly: 'error', |
| 146 | + 'dot-notation': 'off', |
| 147 | + 'eol-last': 'error', |
| 148 | + eqeqeq: ['error', 'smart'], |
| 149 | + 'guard-for-in': 'error', |
| 150 | + 'id-blacklist': 'off', |
| 151 | + 'id-match': 'off', |
| 152 | + 'import/no-deprecated': 'warn', |
| 153 | + indent: 'off', |
| 154 | + 'jsdoc/check-alignment': 'error', |
| 155 | + 'jsdoc/check-indentation': 'error', |
| 156 | + 'jsdoc/newline-after-description': 'error', |
| 157 | + 'linebreak-style': 'off', |
| 158 | + 'max-classes-per-file': ['error', 1], |
| 159 | + 'max-len': 'off', |
| 160 | + 'new-parens': 'error', |
| 161 | + 'newline-per-chained-call': 'off', |
| 162 | + 'no-bitwise': 'error', |
| 163 | + 'no-caller': 'error', |
| 164 | + 'no-cond-assign': 'off', |
| 165 | + 'no-console': [ |
| 166 | + 'error', |
| 167 | + { |
| 168 | + allow: [ |
| 169 | + 'log', |
| 170 | + 'warn', |
| 171 | + 'dir', |
| 172 | + 'timeLog', |
| 173 | + 'assert', |
| 174 | + 'clear', |
| 175 | + 'count', |
| 176 | + 'countReset', |
| 177 | + 'group', |
| 178 | + 'groupEnd', |
| 179 | + 'table', |
| 180 | + 'dirxml', |
| 181 | + 'error', |
| 182 | + 'groupCollapsed', |
| 183 | + 'Console', |
| 184 | + 'profile', |
| 185 | + 'profileEnd', |
| 186 | + 'timeStamp', |
| 187 | + 'context' |
| 188 | + ] |
| 189 | + } |
| 190 | + ], |
| 191 | + 'no-debugger': 'error', |
| 192 | + 'no-duplicate-imports': 'error', |
| 193 | + 'no-empty': 'off', |
| 194 | + 'no-empty-function': 'off', |
| 195 | + 'no-eval': 'error', |
| 196 | + 'no-extra-semi': 'off', |
| 197 | + 'no-fallthrough': 'error', |
| 198 | + 'no-invalid-this': 'off', |
| 199 | + 'no-irregular-whitespace': 'error', |
| 200 | + 'no-multiple-empty-lines': [ |
| 201 | + 'error', |
| 202 | + { |
| 203 | + max: 2 |
| 204 | + } |
| 205 | + ], |
| 206 | + 'no-new-wrappers': 'error', |
| 207 | + 'no-restricted-imports': ['error', 'rxjs', 'rxjs/Rx'], |
| 208 | + 'no-shadow': 'off', |
| 209 | + 'no-throw-literal': 'error', |
| 210 | + 'no-trailing-spaces': 'error', |
| 211 | + 'no-undef-init': 'error', |
| 212 | + 'no-underscore-dangle': 'off', |
| 213 | + 'no-unsafe-finally': 'error', |
| 214 | + 'no-unused-expressions': 'error', |
| 215 | + 'no-unused-labels': 'error', |
| 216 | + 'no-use-before-define': 'off', |
| 217 | + 'no-var': 'error', |
| 218 | + 'object-shorthand': 'error', |
| 219 | + 'one-var': ['error', 'never'], |
| 220 | + 'padded-blocks': [ |
| 221 | + 'off', |
| 222 | + { |
| 223 | + blocks: 'never' |
| 224 | + }, |
| 225 | + { |
| 226 | + allowSingleLineBlocks: true |
| 227 | + } |
| 228 | + ], |
| 229 | + 'prefer-arrow/prefer-arrow-functions': 'error', |
| 230 | + 'prefer-const': 'error', |
| 231 | + 'quote-props': 'off', |
| 232 | + quotes: ['error', 'single', { allowTemplateLiterals: true }], |
| 233 | + radix: 'error', |
| 234 | + semi: 'error', |
| 235 | + 'space-before-function-paren': 'off', |
| 236 | + 'space-in-parens': ['off', 'never'], |
| 237 | + 'spaced-comment': [ |
| 238 | + 'error', |
| 239 | + 'always', |
| 240 | + { |
| 241 | + markers: ['/'] |
| 242 | + } |
| 243 | + ], |
| 244 | + 'use-isnan': 'error', |
| 245 | + 'valid-typeof': 'off', |
| 246 | + 'no-else-return': 'error', |
| 247 | + 'no-unused-expressions': 'error', |
| 248 | + 'no-unused-vars': 'error' |
| 249 | + } |
| 250 | +}; |
0 commit comments