-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
92 lines (88 loc) · 2.49 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
module.exports = {
env: { es6: true },
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'jsdoc'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:jsdoc/recommended'],
rules: {
semi: 'off',
quotes: ['error', 'single'],
'@typescript-eslint/semi': ['error', 'never'],
'@typescript-eslint/member-delimiter-style': [
'error',
{
multiline: {
delimiter: 'none',
requireLast: true,
},
singleline: {
delimiter: 'semi',
requireLast: false,
},
},
],
camelcase: 'off',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/ban-ts-comment': 'warn',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'default',
format: ['camelCase'],
},
{
selector: 'variable',
format: ['camelCase', 'UPPER_CASE'],
},
{
selector: 'parameter',
format: ['camelCase'],
// 'leadingUnderscore': 'allow'
},
{
selector: 'enumMember',
format: ['PascalCase', 'UPPER_CASE'],
},
// {
// 'selector': 'memberLike',
// 'modifiers': ['private'],
// 'format': ['camelCase'],
// 'leadingUnderscore': 'require'
// },
{
selector: 'typeLike',
format: ['PascalCase'],
},
],
'object-curly-spacing': ['warn', 'always'],
'no-console': 'error',
'no-debugger': 'error',
// allow paren-less arrow functions
'arrow-parens': 0,
// variable declaration
'one-var': ['error', 'never'],
'no-var': ['error'],
// allow async-await
'generator-star-spacing': 0,
// allow comma-dangle
'comma-dangle': ['error', 'only-multiline'],
indent: ['error', 2, { ignoredNodes: ['TemplateLiteral'], SwitchCase: 1 }],
'template-curly-spacing': 'warn',
// 'jsdoc/check-examples': 'off',
'jsdoc/check-indentation': 'warn',
'jsdoc/check-syntax': 'warn',
'jsdoc/match-description': 'warn',
'jsdoc/tag-lines': ['warn', 'always', { startLines: 1, count: 0 }],
// 'jsdoc/no-types': 'off',
'jsdoc/require-description': 'warn',
'jsdoc/require-description-complete-sentence': 'warn',
// 'jsdoc/require-example': 'off',
'jsdoc/require-hyphen-before-param-description': 'off',
'jsdoc/check-types': 'warn',
},
settings: {
jsdoc: {
mode: 'typescript',
},
},
}