-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
102 lines (102 loc) · 2.14 KB
/
index.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
module.exports = {
extends: "airbnb",
parser: "babel-eslint",
plugins: ["react", "jsx-a11y", "import"],
parserOptions: {
ecmaVersion: 6,
sourceType: "module",
ecmaFeatures: {
jsx: true
}
},
rules: {
radix: 0,
eqeqeq: 0,
camelcase: 0,
"one-var": 0,
"array-callback-return": [0],
"consistent-return": [0, { treatUndefinedAsUnspecified: true }],
indent: ["error", 2, { SwitchCase: 1 }],
// spacing
"no-multiple-empty-lines": [
2,
{
max: 1,
maxEOF: 0,
maxBOF: 0
}
],
"no-param-reassign": [0],
// strings
quotes: [2, "double", "avoid-escape"],
// code arrangement matter
"no-use-before-define": [
2,
{
functions: false
}
],
// make it meaningful
"prefer-const": 1,
// keep it simple
complexity: [1, 25],
// react
"react/prefer-es6-class": 0,
"react/jsx-filename-extension": 0,
"jsx-a11y/media-has-caption": 0,
"react/jsx-indent": [2, 2],
"comma-dangle": ["error", "only-multiline"],
"arrow-body-style": [0, "as-needed"],
"no-unused-vars": [
"error",
{
args: "none"
}
],
"react/jsx-boolean-value": [1, "always"],
"react/forbid-prop-types": [
1,
{
forbid: ["any"]
}
],
"import/prefer-default-export": [1],
"no-underscore-dangle": [0],
"no-console": [
0,
{
allow: ["warn", "error"]
}
],
"no-restricted-syntax": [0],
"no-useless-constructor": [0],
"no-array-index-key": [0],
"import/no-extraneous-dependencies": [
"error",
{
devDependencies: true,
optionalDependencies: false,
peerDependencies: false
}
],
"no-unused-expressions": [
"error",
{
allowTernary: true,
allowTaggedTemplates: true
}
],
"max-len": [
"error",
{
code: 100,
ignoreComments: true,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true
}
],
"no-mixed-operators": [0],
"react/no-did-mount-set-state": [0]
}
};