-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
138 lines (138 loc) · 4.86 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
module.exports = {
'env': {
'commonjs': true,
'es6': true,
'node': true,
},
'extends': 'eslint:recommended',
'globals': {
'Atomics': 'readonly',
'SharedArrayBuffer': 'readonly',
},
'parserOptions': {
'ecmaVersion': 2018,
},
'rules': {
'array-bracket-newline': [ 'error', 'consistent' ],
'array-bracket-spacing': [ 'error', 'always' ],
'array-element-newline': [ 'error', 'consistent' ],
'arrow-body-style': [ 'error', 'as-needed' ],
'arrow-parens': [ 'error', 'always' ],
'arrow-spacing': [ 'error', {
'before': true,
'after': true,
} ],
'block-spacing': [ 'error', 'always' ],
'brace-style': [ 'error', '1tbs' ],
'class-methods-use-this': [ 'warn' ],
'camelcase': [ 'error', { 'properties': 'never' } ],
'comma-dangle': [ 'error', 'always-multiline' ],
'comma-spacing': [ 'error' ],
'comma-style': [ 'error', 'last' ],
'computed-property-spacing': [ 'error', 'always' ],
'curly': [ 'error', 'all' ],
'default-case': [ 'warn' ],
'dot-location': [ 'error', 'property' ],
'dot-notation': [ 'error' ],
'eol-last': [ 'error', 'always' ],
'eqeqeq': [ 'error', 'always' ],
'func-call-spacing': [ 'error', 'never' ],
'func-names': [ 'error', 'as-needed' ],
'function-paren-newline': [ 'error', 'consistent' ],
'guard-for-in': [ 'warn' ],
'global-require': [ 'error' ],
'handle-callback-err': [ 'error' ],
'implicit-arrow-linebreak': [ 'error', 'beside' ],
'indent': [ 'error', 2, { 'SwitchCase': 1 } ],
'key-spacing': [ 'error', { 'mode': 'minimum' } ],
'keyword-spacing': [ 'error' ],
'line-comment-position': [ 'error', {
'position': 'above',
'ignorePattern': 'todo|fixme',
} ],
'linebreak-style': [ 'error', 'unix' ],
'lines-between-class-members': [ 'error', 'always' ],
'max-classes-per-file': [ 'error', 1 ],
'max-len': [ 'error', { 'code': 100 } ],
'max-statements-per-line': [ 'error' ],
'multiline-comment-style': [ 'error', 'separate-lines' ],
'no-buffer-constructor': [ 'error' ],
'no-case-declarations': [ 'error' ],
'no-confusing-arrow': [ 'error', { 'allowParens': true } ],
'no-console': [ 'warn' ],
'no-else-return': [ 'error' ],
'no-empty-function': [ 'error' ],
'no-eq-null': [ 'error' ],
'no-floating-decimal': [ 'error' ],
'no-invalid-this': [ 'error' ],
'no-mixed-operators': [ 'error' ],
'no-multi-assign': [ 'error' ],
'no-multi-spaces': [ 'error', {
'exceptions': { 'Property': true },
'ignoreEOLComments': true,
} ],
'no-multi-str': [ 'error' ],
'no-multiple-empty-lines': [ 'error', {
'max': 2,
'maxBOF': 1,
'maxEOF': 1,
} ],
'no-nested-ternary': [ 'error' ],
'no-new': [ 'error' ],
'no-new-object': [ 'error' ],
'no-new-require': [ 'error' ],
'no-octal-escape': [ 'error' ],
'no-param-reassign': [ 'error', { 'props': false } ],
'no-path-concat': [ 'error' ],
'no-return-assign': [ 'warn' ],
'no-return-await': [ 'error' ],
'no-self-compare': [ 'error' ],
'no-shadow': [ 'error' ],
'no-shadow-restricted-names': [ 'error' ],
'no-tabs': [ 'error' ],
'no-this-before-super': [ 'error' ],
'no-throw-literal': [ 'error' ],
'no-trailing-spaces': [ 'error' ],
'no-unneeded-ternary': [ 'error' ],
'no-useless-catch': [ 'error' ],
'no-useless-computed-key': [ 'error' ],
'no-useless-concat': [ 'error' ],
'no-useless-return': [ 'warn' ],
'no-var': [ 'error' ],
'no-warning-comments': [ 'warn', {
'terms': [ 'todo', 'fixme' ],
'location': 'start',
} ],
'no-whitespace-before-property': [ 'error' ],
'object-curly-newline': [ 'error' ],
'object-curly-spacing': [ 'error', 'always' ],
'object-property-newline': [ 'error', { 'allowAllPropertiesOnSameLine': false } ],
'object-shorthand': [ 'error', 'always' ],
'operator-linebreak': [ 'error', 'before' ],
'padded-blocks': [ 'error', 'never' ],
'prefer-const': [ 'warn' ],
'prefer-named-capture-group': [ 'warn' ],
'prefer-promise-reject-errors': [ 'warn' ],
'prefer-spread': [ 'error' ],
'prefer-template': [ 'error' ],
'quotes': [ 'error', 'single' ],
'require-unicode-regexp': [ 'warn' ],
'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', 'always' ],
'space-in-parens': [ 'error', 'never' ],
'space-infix-ops': [ 'error' ],
'space-unary-ops': [ 'error', {
'words': true,
'nonwords': false,
} ],
'spaced-comment': [ 'error', 'always' ],
'switch-colon-spacing': [ 'error' ],
'template-curly-spacing': [ 'error' ],
'unicode-bom': [ 'error', 'never' ],
'wrap-regex': [ 'error' ],
},
};