-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
51 lines (51 loc) · 1.47 KB
/
.eslintrc.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
module.exports = {
extends: [
'airbnb',
'plugin:flowtype/recommended',
'plugin:prettier/recommended',
'plugin:react/recommended',
// 'plugin:fp/recommended',
'prettier/flowtype',
'prettier/react',
// 'cleanjs',
],
parser: 'babel-eslint',
plugins: ['flowtype', 'fp', 'prettier', 'react', 'jest'],
env: {
jest: true,
},
rules: {
'arrow-parens': 0, // does not work with Flow generic types.
'arrow-body-style': 0,
'fp/no-mutating-assign': 2,
'global-require': 0, // used by react-native
'import/first': 0, // we sort by unit/atom
'import/no-named-as-default': 0, // we export components for testing
'import/prefer-default-export': 0, // actions can have only one action
'no-confusing-arrow': 0, // this rule is confusing
'no-duplicate-imports': 0, // handled by eslint-plugin-import
'no-underscore-dangle': 0,
'react/forbid-prop-types': 0, // handled by flowtype
'react/jsx-filename-extension': 0,
'react/require-default-props': 0, // handled by flowtype
'react/sort-comp': [
2,
{
order: [
'type-annotations',
'state',
'/^static fragments',
'static-methods',
'lifecycle',
'/^on.+$/',
'/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/',
'everything-else',
'/^render.+$/',
'render',
],
},
],
'require-jsdoc': 0,
'valid-jsdoc': 'error',
},
};