-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
57 lines (57 loc) · 1.81 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
52
53
54
55
56
57
module.exports = {
extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2019,
project: './tsconfig.json',
sourceType: 'module',
},
rules: {
'@typescript-eslint/ban-ts-ignore': 'off',
// '@typescript-eslint/no-unused-vars': ['error'],
'@typescript-eslint/no-empty-interface': ['error'],
'@typescript-eslint/no-unused-expressions': ['error'],
'@typescript-eslint/no-use-before-define': ['error'],
'@typescript-eslint/no-useless-constructor': ['error'],
'@typescript-eslint/return-await': ['error'],
'@typescript-eslint/await-thenable': ['error'],
'@typescript-eslint/no-explicit-any': ['off'],
// '@typescript-eslint/no-unnecessary-condition': ['warn'],
'@typescript-eslint/prefer-as-const': ['warn'],
'@typescript-eslint/prefer-namespace-keyword': ['warn'],
'@typescript-eslint/prefer-readonly': ['warn'],
'@typescript-eslint/promise-function-async': ['error'],
'@typescript-eslint/naming-convention': [
'warn',
// {
// selector: 'variableLike',
// format: ['camelCase'],
// },
// {
// selector: 'variable',
// modifiers: ['const'],
// format: ['UPPER_CASE', 'PascalCase'],
// },
{
selector: 'variable',
types: ['boolean'],
format: ['PascalCase'],
prefix: ['is', 'should', 'has', 'can', 'did', 'will', 'are', 'starts', 'was', 'does'],
},
{
selector: 'interface',
format: ['PascalCase'],
custom: {
regex: '^I[A-Z]',
match: true,
},
},
{
selector: 'memberLike',
modifiers: ['private'],
format: ['camelCase'],
leadingUnderscore: 'require',
},
],
},
};