-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
71 lines (56 loc) · 1.95 KB
/
.eslintrc
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
{
"extends": "airbnb",
"parser": "babel-eslint",
"plugins": ["jest"],
"env": {
"jest/globals": true
},
"rules": {
// for babel-eslint
"strict": 0,
// indentation
"indent": [2, 2, { "SwitchCase": 1 }],
// spacing
"object-curly-spacing": [2, "always"],
"no-multiple-empty-lines": [2, {"max": 1, "maxEOF": 0, "maxBOF": 0}],
// code arrangement matter
"no-use-before-define": [2, {"functions": false}],
// make it meaningful
"prefer-const": 1,
// react
"react/prefer-es6-class": 0,
"react/jsx-filename-extension": 0,
"react/jsx-curly-spacing": [2, "always"],
"react/jsx-indent": [2, 4],
// no error on override
"class-methods-use-this": [0],
// allows underscore dangle for this methods
"no-underscore-dangle": ["error", { "allowAfterThis": true }],
// allow unused parameters
"no-unused-vars": ["error", { "args": "none" }],
// no radix required in parseInt
"radix": ["error", "as-needed"],
// allow long lines
"max-len": ["error", { "code": 100 }],
// allow unary operator
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
// do not use destructuring for arrays
"prefer-destructuring": ["error", {
"VariableDeclarator": {
"array": false,
"object": true
},
"AssignmentExpression": {
"array": false,
"object": false
}
}, {
"enforceForRenamedProperties": false
}],
// ignore trailing spaces since some IDEs insert by default
"no-trailing-spaces": ["error", { "skipBlankLines": true }],
// allow reassignment of param properties
"no-param-reassign": [2, { "props": false }],
"import/no-dynamic-require": 0
}
}