-
Notifications
You must be signed in to change notification settings - Fork 13
/
.eslintrc.js
41 lines (32 loc) · 1.22 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
module.exports = {
extends: ['airbnb', 'plugin:flowtype/recommended', 'prettier'],
parser: '@babel/eslint-parser',
plugins: ['flowtype', 'prettier'],
rules: {
'prettier/prettier': 'error',
// https://github.com/airbnb/javascript/pull/985#issuecomment-239145468
'react/jsx-filename-extension': 'off',
'react/jsx-props-no-spreading': 'off',
// We use Flow in most of our projects so we don't really need prop-type validation.
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md
'react/prop-types': 'off',
// we dynamically generate components at runtime, so these linters give false positives
'react/require-default-props': 'off',
'react/default-props-match-prop-types': 'off',
// "type-annotations" isn't in the default options of 'react/sort-comp'.
'react/sort-comp': [
'error',
{
order: ['type-annotations', 'static-methods', 'lifecycle', 'everything-else', 'render'],
},
],
},
overrides: [
{
files: ['tests/**/*.js'],
env: {
jest: true,
},
},
],
};