-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
128 lines (127 loc) · 3.21 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
module.exports = {
extends: ['airbnb-base', 'prettier'],
env: {
browser: true,
node: true,
jest: true,
es6: true,
},
globals: {
describe: false,
it: false,
expect: false,
},
rules: {
indent: [
'error',
4,
{
ignoredNodes: ['TemplateLiteral'],
},
],
camelcase: [
'error',
{
properties: 'never',
},
],
semi: ['warn', 'always'],
'max-params': ['warn', 5],
'max-depth': ['warn', 4],
'max-statements': ['warn', 20],
'linebreak-style': ['warn', 'unix'],
'class-methods-use-this': 'off',
'comma-style': ['warn', 'last'],
'no-mixed-spaces-and-tabs': ['warn'],
'no-prototype-builtins': 'off',
'no-return-assign': ['error', 'except-parens'],
'no-restricted-syntax': [
'error',
'ForInStatement',
'LabeledStatement',
'WithStatement',
],
'no-unused-vars': [
'error',
{
ignoreRestSiblings: true,
argsIgnorePattern: 'res|next|^err',
},
],
'prefer-const': [
'error',
{
destructuring: 'all',
},
],
'arrow-body-style': ['error', 'as-needed'],
'no-unused-expressions': [
'error',
{
allowTaggedTemplates: true,
},
],
'no-param-reassign': [
'error',
{
props: false,
},
],
'max-len': [
'error',
{
code: 120,
comments: 80,
tabWidth: 4,
},
],
'no-shadow': [
'error',
{
hoist: 'all',
allow: ['resolve', 'reject', 'done', 'next', 'err', 'error'],
},
],
quotes: [
'error',
'single',
{
avoidEscape: true,
allowTemplateLiterals: true,
},
],
'import/prefer-default-export': 'off',
'prettier/prettier': [
'error',
{
trailingComma: 'es5',
singleQuote: true,
printWidth: 80,
},
],
'vars-on-top': 'error',
'valid-jsdoc': [
'error',
{
prefer: {
arg: 'param',
argument: 'param',
class: 'constructor',
return: 'return',
virtual: 'abstract',
},
preferType: {
Boolean: 'boolean',
Number: 'number',
Object: 'object',
String: 'string',
},
requireReturn: false,
matchDescription: '.+',
requireParamDescription: false,
requireReturnDescription: false,
},
],
},
plugins: ['html', 'prettier'],
};