forked from izaakschroeder/semver-set
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
112 lines (83 loc) · 2.45 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
109
110
111
112
{
"env": {
"browser": true,
"node": true
},
// Use the power of babel for parsing. This allows for use of newer versions
// of Javascript and things like JSX.
"parser": "babel-eslint",
"plugins": [
"react"
],
"globals": {
},
"rules": {
// The one true brace style.
"brace-style": [2, "1tbs"],
//
"default-case": 2,
// Enforce case guidelines used in Javascript.
"camelcase": 2,
//
"consistent-this": [2, "_this"],
// Prevent abbreviated blocks for clarity.
"curly": 2,
// Prefer foo.x over foo['x']; static properties are always preferable
// to dynamic strings.
"dot-notation": 2,
// Just convention for a lot of tools; git in particular.
// See: http://stackoverflow.com/questions/729692
"eol-last": 2,
// Give functions names makes them easier to debug and follow in stack
// traces.
"func-names": 2,
"func-style": [2, "declaration"],
"guard-for-in": 2,
"key-spacing": [2, { "beforeColon": false, "afterColon": true }],
"new-cap": 0,
"no-floating-decimal": 2,
"no-lonely-if": 2,
// Who would do this?
"no-mixed-spaces-and-tabs": [2, true],
// Keep things clean.
"no-multiple-empty-lines": 2,
// Nested ternaries are just plain confusing. Avoiding them keeps the
// code readable.
"no-nested-ternary": 2,
"no-spaced-func": 2,
"no-use-before-define": 2,
"no-undefined": 2,
// There are no such thing as "private" properties. Use closure
// variables if you really need isolation.
"no-underscore-dangle": 0,
// Enforce `const` and `let` to describe what's going on.
"no-var": 2,
// Use the one true indentation scheme which just so happens to be
// tabs.
// See: http://programmers.stackexchange.com/questions/57
"indent": [2, "tab"],
// Single quotes are faster to type and seem to be a fairly general
// convention in the JS community.
"quotes": [2, "single"],
// Avoid funny things with parseInt.
// See: http://stackoverflow.com/questions/850341
"radix": 2,
// Enforce whitespace for visual clarity.
"space-after-keywords": [2, "always"],
"spaced-line-comment": 2,
// Transpilers deal with the effects of strict, so ignore it.
"strict": 0,
// Enforce good documentation.
"valid-jsdoc": [2, {
"prefer": {
"return": "returns"
}
}],
// Avoid pitfalls when trying to call a just-declared function.
"wrap-iife": 2,
// May the force be with you.
"yoda": [0, "always"],
"react/jsx-uses-vars": 2,
"react/jsx-uses-react": 2
}
}