-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
127 lines (127 loc) · 4.12 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
module.exports = {
env: {
node: true,
es6: true
},
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module'
},
extends: ['eslint:recommended'],
rules: {
'accessor-pairs': 'error',
'array-bracket-spacing': 'warn',
'arrow-spacing': 'warn',
'block-spacing': ['warn', 'never'],
'brace-style': ['warn', '1tbs', {allowSingleLine: true}],
'camelcase': 'error',
'comma-spacing': 'warn',
'comma-style': 'warn',
'computed-property-spacing': 'warn',
'curly': ['error', 'multi-line'],
'dot-location': ['warn', 'property'],
'dot-notation': 'warn',
'eol-last': 'warn',
'eqeqeq': 'error',
'func-call-spacing': 'warn',
'generator-star-spacing': ['warn', {before: true, after: false, anonymous: 'neither'}],
'indent': ['warn', 2, {
SwitchCase: 1,
MemberExpression: 'off',
FunctionDeclaration: {parameters: 'off'},
FunctionExpression: {parameters: 'off'}
}],
'key-spacing': ['warn', {mode: 'minimum'}],
'keyword-spacing': 'warn',
'linebreak-style': 'warn',
'lines-between-class-members': 'warn',
'max-len': ['warn', {code: 100, ignoreUrls: true, ignoreRegExpLiterals: true}],
'new-cap': 'error',
'new-parens': 'error',
'no-alert': 'error',
'no-array-constructor': 'error',
'no-bitwise': ['error', {allow: ['~']}],
'no-buffer-constructor': 'error',
'no-caller': 'error',
'no-console': 'off',
'no-constant-condition': ['error', {checkLoops: false}],
'no-duplicate-imports': 'error',
'no-else-return': 'error',
'no-empty-function': 'error',
'no-eval': 'error',
'no-extend-native': 'error',
'no-extra-bind': 'error',
'no-extra-label': 'error',
'no-floating-decimal': 'error',
'no-implicit-globals': 'error',
'no-implied-eval': 'error',
'no-invalid-this': 'error',
'no-iterator': 'error',
'no-lone-blocks': 'error',
'no-lonely-if': 'error',
'no-loop-func': 'error',
'no-multi-spaces': ['warn', {ignoreEOLComments: true}],
'no-multi-str': 'warn',
'no-multiple-empty-lines': 'warn',
'no-negated-condition': 'error',
'no-new': 'error',
'no-new-func': 'error',
'no-new-object': 'error',
'no-new-require': 'error',
'no-new-wrappers': 'error',
'no-octal-escape': 'error',
'no-path-concat': 'error',
'no-proto': 'error',
'no-script-url': 'error',
'no-self-compare': 'error',
'no-sequences': 'error',
'no-shadow': 'error',
'no-shadow-restricted-names': 'error',
'no-tabs': 'warn',
'no-template-curly-in-string': 'error',
'no-throw-literal': 'error',
'no-trailing-spaces': 'warn',
'no-undef-init': 'error',
'no-unexpected-multiline': 'off',
'no-unmodified-loop-condition': 'error',
'no-unneeded-ternary': 'error',
'no-unused-expressions': 'error',
'no-unused-vars': ['error', {args: 'none'}],
'no-use-before-define': ['error', {functions: false}],
'no-useless-call': 'error',
'no-useless-computed-key': 'error',
'no-useless-concat': 'error',
'no-useless-constructor': 'error',
'no-useless-rename': 'error',
'no-useless-return': 'error',
'no-var': 'error',
'no-whitespace-before-property': 'warn',
'no-with': 'error',
'nonblock-statement-body-position': 'error',
'object-curly-spacing': 'warn',
'object-shorthand': 'error',
'operator-linebreak': ['warn', 'after'],
'prefer-arrow-callback': 'error',
'prefer-const': 'error',
'prefer-numeric-literals': 'error',
'prefer-promise-reject-errors': 'error',
'quotes': ['error', 'single', {allowTemplateLiterals: true}],
'radix': 'error',
'rest-spread-spacing': 'warn',
'semi': 'error',
'semi-spacing': 'warn',
'semi-style': 'warn',
'space-before-blocks': 'warn',
'space-before-function-paren': ['warn', 'never'],
'space-in-parens': 'warn',
'space-infix-ops': 'warn',
'space-unary-ops': ['warn', {words: true, nonwords: false}],
'spaced-comment': 'warn',
'strict': ['error'],
'switch-colon-spacing': 'warn',
'template-curly-spacing': 'warn',
'template-tag-spacing': 'warn',
'unicode-bom': 'error',
'yoda': 'error',
}
};