This repository has been archived by the owner on Jul 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
51 lines (51 loc) · 2.18 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
ecmaVersion: 2018, // Allows parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
},
plugins: ['@typescript-eslint'],
extends: ['plugin:@typescript-eslint/recommended'],
rules: {
'@typescript-eslint/explicit-function-return-type': ['warn', {allowExpressions: true}],
'@typescript-eslint/interface-name-prefix': ['warn', 'never'],
'no-extra-parens': 'off',
'@typescript-eslint/no-extra-parens': ['error'],
'@typescript-eslint/no-this-alias': [
'error',
{
allowDestructuring: false,
allowedNames: ['self'],
},
],
'@typescript-eslint/no-inferrable-types': [
'error',
{
ignoreParameters: true,
ignoreProperties: true
},
],
'@typescript-eslint/no-unnecessary-type-assertion': ['warn'],
'@typescript-eslint/no-useless-constructor': 'warn',
'@typescript-eslint/adjacent-overload-signatures': 'warn',
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/ban-ts-ignore': 'error',
'@typescript-eslint/prefer-for-of': 'warn',
'@typescript-eslint/prefer-includes': 'warn',
'@typescript-eslint/prefer-namespace-keyword': 'warn',
'@typescript-eslint/prefer-string-starts-ends-with': 'warn',
'@typescript-eslint/promise-function-async': ['error'],
'@typescript-eslint/require-array-sort-compare': 'error',
'@typescript-eslint/restrict-plus-operands': 'warn',
'@typescript-eslint/unbound-method': ['warn', {ignoreStatic: true}],
'@typescript-eslint/unified-signatures': 'warn',
'@typescript-eslint/no-explicit-any': 'error',
// @typescript-eslint/func-call-spacing rule not found?
// 'func-call-spacing': 'off',
// '@typescript-eslint/func-call-spacing': ['error'],
// @typescript-eslint/semi rule not found?
// 'semi': 'off',
// '@typescript-eslint/semi': ['error'],
}
}