-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.js
58 lines (56 loc) · 1.57 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
module.exports = {
parser: 'babel-eslint',
env: {
browser: true, // We write for browser
es6: true, // using ES6 syntax
commonjs: true, // sometimes requiring modules in CommonJS
mocha: true // We use Mocha for tests
},
extends: [
'eslint-config-airbnb/base',
'eslint-config-airbnb/rules/strict',
'eslint-config-airbnb/rules/react'
].map(require.resolve),
plugins: [
'flow-vars'
],
rules: {
'semi': [2, 'never'],
'indent': [2, 4, {
'SwitchCase': 1
}],
'comma-dangle': [2, 'never'],
'jsx-quotes': [2, 'prefer-double'],
'padded-blocks': [0, 'never'],
'id-length': [2, {'exceptions': ['b']}],
'new-cap': [2, {
'newIsCap': true,
'capIsNewExceptions': ['List', 'Map', 'Set']
}],
'no-console': 2,
'no-debugger': 2,
'guard-for-in': 0,
'object-curly-spacing': [2, 'always'],
'template-curly-spacing': [2, 'always'],
// React
'react/jsx-indent-props': [2, 4],
'react/sort-comp': [2, {
order: [
'flow-types',
'static-methods',
'lifecycle',
'everything-else',
'render'
],
groups: {
'flow-types': [
'props',
'state'
]
}
}],
// flow-vars plugin
'flow-vars/define-flow-type': 1,
'flow-vars/use-flow-type': 1
}
};