-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
151 lines (149 loc) · 3.97 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint',
],
parserOptions: {
"project":"./tsconfig.json",
ecmaVersion: 2018,
sourceType: 'module',
},
env: {
node: true,
mocha: true,
es6: true,
},
// see https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin
// for list of rules
rules: {
'@typescript-eslint/member-delimiter-style': {
multiline: {
delimiter: 'comma',
requireLast: true,
},
singleline: {
delimiter: 'comma',
requireLast: true,
},
overrides: {
interface: {
multiline: {
delimiter: 'none',
requireLast: false,
},
},
},
},
'@typescript-eslint/indent': ['none', 2],
'@typescript-eslint/interface-name-prefix': 'error',
// '@typescript-eslint/member-ordering': ['warn', {'default': ["method", "constructor", "field"] }],
'@typescript-eslint/await-thenable':'error',
'@typescript-eslint/member-naming':'error',
'@typescript-eslint/no-extra-parens':'error',
// '@typescript-eslint/no-extraneous-class':['warn',{staticOnly:true}],
'@typescript-eslint/no-for-in-array':'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-useless-constructor':'error',
'@typescript-eslint/prefer-for-of':'error',
'@typescript-eslint/prefer-includes':'error',
'@typescript-eslint/prefer-string-starts-ends-with':'error',
'@typescript-eslint/promise-function-async':'error',
'@typescript-eslint/restrict-plus-operands':'error',
'@typescript-eslint/unified-signatures':'error',
semi: [
'error',
'never',
{
beforeStatementContinuationChars: 'always',
},
],
'member-ordering':'always',
'no-trailing-spaces':'error',
'no-irregular-whitespace':'error',
indent: ['error', 2],
quotes: ['error', 'single'],
'prefer-arrow-callback': 'error',
'no-confusing-arrow': 'error',
'arrow-spacing': 'error',
'arrow-parens': [
'warn',
'always',
{
requireForBlockBody: true,
},
],
'arrow-body-style': 'error',
'no-console': 'off',
'max-len': [
1,
{
code: 132,
ignoreStrings: true,
},
],
'no-unexpected-multiline': 2,
'no-new-object': 'error',
'object-shorthand': 'error',
'quote-props': ['error', 'as-needed'],
'no-prototype-builtins': 'error',
'no-array-constructor': 'error',
'array-callback-return': 'error',
'prefer-destructuring': 'error',
'prefer-template': 'error',
'template-curly-spacing': ['error', 'never'],
'no-eval': 'error',
'no-var': 'error',
'prefer-const': 'error',
'no-const-assign': 'error',
'func-style': 'error',
'wrap-iife': 'error',
'no-loop-func': 'error',
'prefer-rest-params': 'error',
'spaced-comment': 'error',
'space-before-blocks': 'error',
'keyword-spacing': 'error',
'space-infix-ops': 'error',
'newline-per-chained-call': 'error',
'no-whitespace-before-property': 'error',
'padded-blocks': [
'warn',
'never',
{
classes: 'always',
},
],
'space-in-parens': 'error',
'array-bracket-spacing': 'error',
'block-spacing': ['error', 'never'],
'comma-spacing': 'error',
'func-call-spacing': 'error',
'object-curly-spacing': 'error',
'no-multiple-empty-lines': 'error',
'comma-style': 'error',
// 'comma-dangle': [
// 'warn',
// {
// arrays: 'never',
// objects: 'always-multiline',
// imports: 'never',
// exports: 'always',
// functions: 'ignore',
// },
// ],
'no-new-wrappers': 'error',
radix: 'error',
'id-length': [
'warn',
{
min: 1,
max: 28,
},
],
camelcase: 'error',
'new-cap': 'error',
'no-restricted-globals': 'error',
'eol-last': 'off',
},
}