-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc
100 lines (90 loc) · 2.59 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
{
"extends": "airbnb",
"parser": "babel-eslint",
"env": {
"mocha": true
},
"plugins": [
"react-native"
],
"ecmaFeatures": {
"spread": true,
"restParams": true,
},
"rules": {
// Enable React Native rules
"react-native/no-unused-styles": 1,
"react-native/split-platform-components": 2,
// === Overrides from AirBnB rules ===
// Tabs all the way. Cue religious wars.
"indent": [
1,
"tab"
],
"linebreak-style": [
1,
"unix"
],
"semi": [
2,
"never"
],
// I'm not bothered by this. Justification is that it might make whitespace differences in diffs, but hey. So warn.
"no-trailing-spaces": 1,
// New string templates are good, but are not required. More like... guidelines.
"prefer-template": 1,
"max-len": [
1,
{
"code": 120,
"tabWidth": 4,
"ignoreUrls": true
}
],
"new-cap": [
2,
{
"capIsNewExceptions": [
"Immutable.Map",
"Immutable.List",
"Immutable.Record",
"Immutable.OrderedMap",
"Immutable.OrderedList",
"Immutable.Set",
"Immutable.Stack"
]
}
],
"no-unused-vars": [
1,
// Ignore the React variable because we nearly always
// need to include it but don't invoke it directly.
{ "varsIgnorePattern": "^React$" }
],
// Disable because we aren't going to be using vars, and will often have
// elements like "const style = ..." that can legitimately go at the bottom.
"no-use-before-define": 0,
"no-underscore-dangle": 0,
// "react/jsx-closing-bracket-location": [
// 1,
// "props-aligned"
// ],
"react/jsx-indent": [
1,
"tab"
],
"react/jsx-indent-props": [
1,
"tab"
],
"react/prop-types": 1,
"default-case": 0,
"react/jsx-curly-spacing": 1,
// The following is temporary. If we determine that we need better performance, re-enable this as a warning
"react/jsx-no-bind": [
1,
"allowArrowFunctions": true
],
"react/prefer-stateless-function": 0
},
}