UNPKG

1.44 kBPlain TextView Raw
1{
2 "env": {
3 "node": true
4 },
5 "rules": {
6 // 2-space indentation
7 "indent": [2, 2],
8 // Disallow semi-colons, unless needed to disambiguate statement
9 "semi": [2, "never"],
10 // Require strings to use single quotes
11 "quotes": [2, "single"],
12 // Require curly braces for all control statements
13 "curly": 2,
14 // Disallow using variables and functions before they've been defined
15 "no-use-before-define": 2,
16 // Allow any case for variable naming
17 "camelcase": 0,
18 // Disallow unused variables, except as function arguments
19 "no-unused-vars": [2, {"args":"none"}],
20 // Allow leading underscores for method names
21 // REASON: we use underscores to denote private methods
22 "no-underscore-dangle": 0,
23 // Allow multi spaces around operators since they are
24 // used for alignment. This is not consistent in the
25 // code.
26 "no-multi-spaces": 0,
27 // Style rule is: most objects use { beforeColon: false, afterColon: true }, unless aligning which uses:
28 //
29 // {
30 // beforeColon : true,
31 // afterColon : true
32 // }
33 //
34 // eslint can't handle this, so the check is disabled.
35 "key-spacing": 0,
36 // Allow shadowing vars in outer scope (needs discussion)
37 "no-shadow": 0,
38 // Use if () { }
39 // ^ space
40 "space-after-keywords": [2, "always"],
41 // Use if () { }
42 // ^ space
43 "space-before-blocks": [2, "always"]
44 }
45}