-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc-percolate
109 lines (77 loc) · 3.21 KB
/
.eslintrc-percolate
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
/* Percolate Studio's javascript linting configuration
*
* Documentation on rules can be found at:
* http://eslint.org/docs/rules/ <- Optionally append the rulename
*/
{
"env": {
/* Allows global vars in a node environment to pass and enables certain rules
E.g "node": true, "browser": true */
},
"rules": {
/* Warns on TODO/FIXMEs */
"no-warning-comments": 1,
/* Ensures any jsdoc comments used are valid jsdoc */
"valid-jsdoc": 2,
/* Disallows shadowing and explicitly using undefined */
"no-undefined": 2,
/* Disallow comparison like x == x */
"no-self-compare": 2,
/* Disallow null comparisons without a typecheck, x === null is ok */
"no-eq-null": 2,
/* Disallows redundant return from else */
"no-else-return": 2,
/* Guards against accidentally using a prototype's keys in a for..in loop */
"guard-for-in": 2,
/* Enforces consistent use of .properties in regards to newlines */
"dot-location": [2, "property"],
/* Enforces that switch statements always have a default case */
"default-case": 2,
/* 2 spaces indentation */
"indent": [2, 2],
/* Unix style line endings */
"linebreak-style": [2, "unix"],
/* Double quotes unless single quotes are used to avoid escaping */
"quotes": [2, "double", "avoid-escape"],
/* At least one space after // comments */
"spaced-line-comment": 2,
/* Spacing on unary operators OK: delete x.y, !bar */
"space-unary-ops": [1, {"words": true, "nonwords": false}],
/* No spacing in params OK: (1 + 2) */
"space-in-parens": [2, "never"],
/* No spacing in brackets OK: [1, 2, 3], {x:1} */
"space-in-brackets": [2, "never"],
/* Spacing in function declarations OK: function(foo)
"space-before-function-paren": [2, "never"],
/* Spacing in blocks OK: if (a) { */
"space-before-blocks": [2, "always"],
/* Spacing after keywords OK: if (a) */
"space-after-keywords": [2, "always"],
/* Force properties to be always quoted to prevent mistakes and ensure consistency */
"quote-props": [2, "as-needed"],
/* No padding within blocks */
"padded-blocks": [2, "never"],
/* When splitting operations over multiple lines, the operator should come before */
"operator-linebreak": [2, "before"],
/* Disallows use of uneccessary ternary ops eg: answer === 1 ? true : false */
"no-unneeded-ternary": 2,
/* Disallows nesting of ternary operations */
"no-nested-ternary": 2,
/* Maximum 2 empty lines */
"no-multiple-empty-lines": [2, {"max": 1}],
/* Must combine else and if to else if */
"no-lonely-if": 2,
/* Comments must be on their own line */
"no-inline-comments": 2,
/* Functions are always assigned to vars OK: var foo = function() */
"func-style": [2, "expression"],
/* Var capturing this should always be called self */
"consistent-this": [2, "self"],
/* Multiline expressions with commas must put comma on the end of the line */
"comma-style": [2, "last"],
/* Enforces comma spacing after comma but not before OK: [1, 2] */
"comma-spacing": [2, {"before": false, "after": true}],
/* Enforces 1 true brace style */
"brace-style": [2, "stroustrop"]
}
}