-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.eslintrc.js
70 lines (59 loc) · 2.26 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
67
68
69
70
// eslint-disable-next-line import/unambiguous
module.exports = {
parser: 'babel-eslint',
plugins: [
'ava', // SEE: https://github.com/avajs/eslint-plugin-ava
'babel', // SEE: https://github.com/babel/eslint-plugin-babel
'flowtype', // SEE: https://github.com/gajus/eslint-plugin-flowtype
'import', // required by 'eslint-config-airbnb'
'jsx-a11y', // required by 'eslint-config-airbnb'
'react', // required by 'eslint-config-airbnb'
],
extends: [
// SEE: https://git.io/vy8hw
'airbnb',
// SEE: https://github.com/avajs/eslint-plugin-ava#recommended-config
'plugin:ava/recommended', // https://git.io/vy8hy
// SEE: https://git.io/vy8h7
'plugin:flowtype/recommended', // https://git.io/vy8hF
// We don't use 'plugin:import/recommended' because it configures some rules
// as warnings and not errors.
// SEE: https://github.com/benmosher/eslint-plugin-import
'plugin:import/errors', // https://git.io/vyRvM
'plugin:import/warnings', // https://git.io/vyRv9
// SEE: https://github.com/prettier/eslint-config-prettier
'prettier',
'prettier/flowtype',
'prettier/react',
],
rules: {
// Disable this for now, it doesn't seem to work correctly with polymorphic
// Flow types (e.g <T>(...)).
'arrow-parens': 0,
// Override 'plugin:flowtype/recommended'.
'flowtype/no-weak-types': 1,
// From 'eslint-plugin-import'.
'import/unambiguous': 1,
// Disable this, use 'import/no-duplicates' instead (compatible with Flow).
// SEE: https://git.io/vy4vX
'no-duplicate-imports': 0,
// Allow .js files to contain jsx. Overrides the recommended 'airbnb' setting.
// SEE: https://github.com/airbnb/javascript/issues/1089
'react/jsx-filename-extension': 0,
// No semicolons. Overrides the recommended 'airbnb' setting.
semi: 0,
'comma-dangle': [
'error',
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'always-multiline',
},
],
// Override `eslint-config-prettier`.
// SEE: https://github.com/prettier/eslint-config-prettier/blob/master/README.md#no-unexpected-multiline
'no-unexpected-multiline': 'error',
},
}