This repository has been archived by the owner on Jun 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy path.eslintrc.js
153 lines (153 loc) · 5.13 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
152
153
module.exports = {
'extends': 'eslint:recommended',
'parserOptions': {
'ecmaVersion': 2018,
'sourceType': 'module'
},
'env': {
'es6': true,
'node': true
},
'rules': {
'indent': ['error', 2],
'linebreak-style': ['error', 'unix'],
'quotes': ['error', 'single'],
'comma-dangle': ['error', 'always-multiline'],
'array-bracket-newline': ['error', {'multiline': true}],
'array-bracket-spacing': ['error', 'never'],
'arrow-parens': ['error', 'as-needed', {'requireForBlockBody': true}],
'arrow-spacing': 'error',
'no-var': 'error',
'block-spacing': 'error',
'brace-style': 'error',
'callback-return': 'error',
'camelcase': 'error',
'comma-spacing': 'error',
'comma-style': ['error', 'last'],
'computed-property-spacing': 'error',
'curly': 'error',
'default-case': 'error',
'dot-location': ['error', 'property'],
'dot-notation': ['error', {'allowKeywords': false}],
'eol-last': ['error', 'always'],
'eqeqeq': ['error', 'always'],
'for-direction': 'error',
'func-call-spacing': ['error', 'never'],
'function-paren-newline': ['error', 'multiline'],
'generator-star-spacing': ['error', 'before'],
'implicit-arrow-linebreak': ['error', 'beside'],
'key-spacing': 'error',
'keyword-spacing': 'error',
'max-depth': ['error', 4],
'max-len': [
'error',
{
'code': 120,
'ignoreComments': true,
'ignoreTrailingComments': true,
'ignoreUrls': true,
'ignoreStrings': true,
'ignoreTemplateLiterals': true,
}
],
'max-nested-callbacks': ['error', 3],
'multiline-ternary': ['error', 'always-multiline'],
'operator-linebreak': ['error', 'before', {'overrides': {'?': 'ignore', ':': 'ignore'}}],
'new-parens': 'error',
'no-array-constructor': 'error',
'no-buffer-constructor': 'error',
'no-caller': 'error',
'no-confusing-arrow': ['error', {'allowParens': true}],
'no-continue': 'error',
'no-else-return': ['error', {allowElseIf: false}],
'no-empty-function': 'error',
'no-eq-null': 'error',
'no-eval': 'error',
'no-extra-label': 'error',
'no-floating-decimal': 'error',
'no-implicit-coercion': ['error', {'allow': ['!!']}],
'no-implied-eval': 'error',
'no-labels': 'error',
'no-lone-blocks': 'error',
'no-lonely-if': 'warn',
'no-loop-func': 'error',
'no-magic-numbers': ['warn', {'ignore': [-1, 0, 1], 'ignoreArrayIndexes': true}],
'no-multi-spaces': 'error',
'no-multiple-empty-lines': ['error', {'max': 1}],
'no-new-func': 'error',
'no-new-object': 'error',
'no-new-require': 'error',
'no-new-wrappers': 'error',
'no-octal-escape': 'warn',
'no-param-reassign': ['error', {'props': false}],
'no-path-concat': 'warn',
'no-proto': 'error',
'no-return-assign': ['error', 'except-parens'],
'no-self-compare': 'error',
'no-sequences': 'error',
'no-shadow': 'error',
'no-shadow-restricted-names': 'error',
'no-sync': 'warn',
'no-tabs': 'warn',
'no-template-curly-in-string': 'warn',
'no-throw-literal': 'warn',
'no-trailing-spaces': 'error',
'no-undef-init': 'error',
'no-unmodified-loop-condition': 'warn',
'no-unneeded-ternary': ['error', {'defaultAssignment': false}],
'no-unused-expressions': 'error',
'no-use-before-define': 'error',
'no-useless-call': 'warn',
'no-useless-computed-key': 'error',
'no-useless-concat': 'error',
'no-useless-constructor': 'error',
'no-useless-rename': 'error',
'no-useless-return': 'error',
'no-void': 'warn',
'no-whitespace-before-property': 'error',
'no-with': 'error',
'object-curly-newline': ['error', {'consistent': true}],
'object-curly-spacing': ['error', 'never'],
'object-property-newline': 'error',
'object-shorthand': 'error',
'one-var-declaration-per-line': ['error', 'always'],
'padded-blocks': ['error', 'never'],
'prefer-arrow-callback': 'error',
'prefer-const': 'error',
'prefer-destructuring': ['error', {
'VariableDeclarator': {
'array': false,
'object': true,
},
'AssignmentExpression': {
'array': true,
'object': false,
}
}],
'prefer-promise-reject-errors': 'error',
'prefer-rest-params': 'error',
'prefer-spread': 'error',
'prefer-template': 'error',
'quote-props': ['error', 'consistent-as-needed'],
'radix': 'error',
'require-await': 'error',
'rest-spread-spacing': ['error', 'never'],
'semi': ['error', 'always'],
'semi-spacing': 'error',
'semi-style': ['error', 'last'],
'space-before-blocks': ['error', 'always'],
'space-before-function-paren': ['error', 'never'],
'space-in-parens': ['error', 'never'],
'space-infix-ops': 'error',
'space-unary-ops': 'error',
'spaced-comment': ['error', 'always'],
'strict': ['error', 'safe'],
'switch-colon-spacing': ['error'],
'symbol-description': 'error',
'template-curly-spacing': ['error', 'never'],
'template-tag-spacing': ['error', 'always'],
'wrap-iife': ['error', 'outside'],
'yield-star-spacing': ['error', 'before'],
'yoda': 'error'
}
};