This repository was archived by the owner on Apr 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
71 lines (64 loc) · 2.27 KB
/
index.js
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
module.exports = {
"parser": "babel-eslint",
"extends": [
require.resolve("eslint-config-standard"),
],
"plugins": [
"babel"
],
"rules": {
// disable eslint rules
"no-underscore-dangle": 0, // why not?
"require-jsdoc": 0, // flow type is better
"valid-jsdoc": 0,
// enable eslint rules
"func-style": [2, "declaration", { "allowArrowFunctions": true }],
"no-invalid-this": 0, // this doesn't even work on node streams
// disable airbnb rules
"camelcase": 0, // who cares
"consistent-return": 0, // unnecessary
"default-case": 0, // don't always need one
"no-nested-ternary": 0, // why not?!
"no-param-reassign": 0, // i do this all the time
"no-shadow": 0, // necessary w/ callbacks sometimes
"no-use-before-define": [2, "nofunc"], // function declarations!
"react/jsx-closing-bracket-location": 0, // i don't get it
"strict": 0, // doesn't work inside modules
// enable airbnb rules
"func-names": 0, // use arrow functions instead, but it doesn't really work as expected
"object-curly-spacing": [2, "always"], // yes please
// disable google rules
"max-len": 0, // what is this? 1999?
"no-eq-null": 0, // checks whether it's undefined
"no-implicit-coercion": 0, // no, it's awesome!
"no-inline-comments": 0, // wtf?
"no-warning-comments": 0, // wtf?
// enable google rules
"operator-assignment": 2,
"max-nested-callbacks": [2, 3],
"no-negated-condition": 2,
"quote-props": [2, "as-needed"],
// unset standard rules
"comma-dangle": 0, // who cares
"no-loop-func": 2, // if need to do it, write an eslint comment
"no-return-assign": 0, // no reason to block this. saves SLOC
// custom rules
"arrow-parens": 0, // [2, "as-needed"] doesn't work w/ async functions
"no-cond-assign": 0, // nothing wrong with this
"no-console": 2,
"no-var": 2,
"object-shorthand": [2, "always"],
"operator-linebreak": [2, "before", {
"overrides": {
"=": "after"
}
}],
"prefer-arrow-callback": 2,
"prefer-const": 2,
"prefer-spread": 2,
"prefer-template": 0, // doesn't make sense all the time
"radix": 0,
"require-yield": 0, // doesn't make sense for Koa routes w/o async stuff
"vars-on-top": 0
}
}