This repository has been archived by the owner on Sep 20, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc
62 lines (62 loc) · 1.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
{
"env": {
"node": true,
"jest": true,
},
"extends": [
"airbnb-base",
"eslint:recommended",
"prettier",
"prettier/react",
"plugin:flowtype/recommended",
"plugin:jest/recommended",
],
"parser": "babel-eslint",
"plugins": [
"import",
"jest",
"prettier",
"promise",
"flowtype",
],
"rules": {
"no-use-before-define": 0, # I like the logic going from highlevel to lowlevel.
"no-shadow": 0, # Shadowing is a nice language feature. Naming is hard.
"no-warning-comments": "error",
"import/prefer-default-export": 0, # Keep imports of helper functions consistent.
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": [
"**/*.test.js"
]
}
],
"prefer-const": "error",
"prettier/prettier": [
"error",
{
"bracketSpacing": true,
"printWidth": 80,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"semi": false,
}
],
"promise/always-return": "error",
"promise/no-return-wrap": "error",
"promise/param-names": "error",
"promise/catch-or-return": "error",
"promise/no-native": "off",
"promise/no-nesting": "warn",
"promise/no-promise-in-callback": "warn",
"promise/no-callback-in-promise": "warn",
"promise/avoid-new": "off",
"promise/prefer-await-to-then": "error",
"promise/prefer-await-to-callbacks": "off",
"flowtype/require-valid-file-annotation": "error",
"flowtype/generic-spacing": "off", # in conflict with Prettier
"eol-last": "error"
}
}