This repository was archived by the owner on Jan 16, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
66 lines (66 loc) · 1.73 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
module.exports = {
parser: 'babel-eslint',
root: true,
extends: [
'airbnb',
'plugin:flowtype/recommended',
],
env: {
browser: true,
jest: true,
node: true,
},
plugins: [
'flowtype',
'import',
'jsx-a11y',
'react',
],
settings: {
'import/resolver': {
webpack: {
config: 'webpack/webpack.config.common.js',
},
},
},
rules: {
// Body style is more troublesome than it's worth
'arrow-body-style': 'off',
// Consistent arrow parens.
'arrow-parens': ['error', 'as-needed', { requireForBlockBody: true }],
// After adding flowtypes the lines are getting longer.
'max-len': ['error', 120],
'import/extensions': ['error', 'always',
{
js: 'never',
jsx: 'never'
}
],
'import/no-named-as-default': 'off',
'react/no-array-index-key': 'off',
'react/jsx-closing-bracket-location': 'off',
'react/jsx-first-prop-new-line': ['error', 'never'],
// It just looks nicer without the space.
'react/jsx-space-before-closing': 'off',
// SEE: https://github.com/yannickcr/eslint-plugin-react/issues
'react/no-unused-prop-types': 'off',
// Enables typing to be placed above lifecycle
"react/sort-comp": ['error', {
order: [
'type-annotations',
'static-methods',
'lifecycle',
'/^on.+$/',
'everything-else',
'render',
],
}],
'react/require-default-props': 'off',
// TODO: Replace divs with buttons, but remove all button styling.
'jsx-a11y/no-static-element-interactions': 'off',
// TODO: Investigate this error.
'jsx-a11y/href-no-hash': 'off',
// Let git handle the linebreaks instead.
'linebreak-style': 'off',
},
};