-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
108 lines (99 loc) · 2.98 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
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
{
"env": {
"node": true,
"es6": true
},
"plugins": [
"react"
],
"ecmaFeatures": {
"arrowFunctions": true,
"blockBindings": true,
"classes": true,
"defaultParams": true,
"destructuring": true,
"forOf": true,
"generators": true,
"modules": true,
"objectLiteralComputedProperties": true,
"objectLiteralDuplicateProperties": false,
"objectLiteralShorthandMethods": true,
"objectLiteralShorthandProperties": true,
"superInFunctions": true,
"templateStrings": true,
"unicodeCodePointEscapes": true,
"globalReturn": false,
"jsx": true
},
"rules": {
// possible errors
// @todo turn on
"comma-dangle": [ 0, "always" ],
"no-console": [ 1, "always" ],
// best practices
"consistent-return": [ 2 ], // @todo remove (should be error)
"default-case": [ 2 ],
"guard-for-in": [ 2 ],
"no-eq-null": [ 2 ],
"no-fallthrough": [ 2 ],
"no-floating-decimal": [ 2 ],
"no-self-compare": [ 2 ],
"no-throw-literal": [ 2 ],
"no-warning-comments": [ 1, { "terms": [ "todo", "fixme" ], "location": "start" } ],
"radix": [ 1 ],
"wrap-iife": [ 2 ],
// strict mode
"strict": [ 2 ],
// variables
"no-catch-shadow": [ 2 ],
"no-undefined": [ 2 ], // @todo change to error
"no-unused-vars": [ 2, {"args": "none"} ], // @todo remove (change to error)
// node environment
"no-mixed-requires": [ 2 ],
"no-new-require": [ 2 ],
"no-path-concat": [ 2 ],
"no-restricted-modules": [ 2 ],
// style
"indent": [ 2, 2, { "indentSwitchCase" : true } ],
"brace-style": [ 2, "1tbs" ],
"camelcase": [ 2 ], // @todo change to error
"comma-spacing": [ 2, { "before": false, "after": true } ],
"consistent-this": [ 2, "self" ],
"eol-last": [ 2 ],
"key-spacing": false,
"max-nested-callbacks": [ 2, 3 ],
"new-cap": 0, // @todo discuss ( immutable :( )
"no-inline-comments": [ 0 ],
"no-lonely-if": [ 2 ],
"no-multiple-empty-lines": [ 2 ],
"no-nested-ternary": [ 2 ],
"no-underscore-dangle": [ 0 ], // @todo discuss
"quote-props": [ 2, "as-needed" ],
"quotes": [ 2, "single", "avoid-escape" ],
"semi": [ 2, "always" ],
"space-after-keywords": [ 2, "always" ],
"space-before-blocks": [ 2, "always" ],
"space-before-function-parentheses": [ 2, "never" ],
// @todo "space-in-brackets": [ 1, "always" ],
"space-in-brackets": [ 0 ],
"space-infix-ops": [ 2 ],
"space-return-throw-case": [ 2 ],
"space-unary-ops": true,
"spaced-line-comment": [ 2 ],
// es6
// @TODO "no-var": [ 0 ],
"generator-star": [ 2 ],
// legacy
"max-depth": [ 2, 2 ],
"max-len": [ 2, 100 ],
"max-params": [ 2, 4 ],
"max-statements": [ 1, 15 ],
"no-bitwise": [ 2 ],
// eslint-plugin-react
"react/jsx-uses-react": [ 2 ],
"react/no-did-mount-set-state": [ 2 ],
"react/no-did-update-set-state": [ 2 ],
"react/prop-types": [ 1 ],
"react/wrap-multilines": [ 2 ],
}
}