-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
103 lines (95 loc) · 2.48 KB
/
.eslintrc
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
{
"parser": "babel-eslint",
"extends": [
"airbnb",
"prettier",
"prettier/flowtype",
"prettier/react"
],
"plugins": [
"flowtype",
"prettier"
],
"env": {
"es6": true,
"node": true,
"browser": true,
"jest": true
},
"settings": {
"import/resolver": {
"babel-module": {}
},
"flowtype": {
"onlyFilesWithFlowAnnotation": true
}
},
"rules" : {
"prettier/prettier": "error",
// import/no-duplicates already does this.
"no-duplicate-imports": 0,
"react/prop-types": 0,
"react/forbid-prop-types": 1,
"react/require-default-props": "off",
// warn when using bind() or arrow functions in JSX props
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md
"react/jsx-no-bind": ["warn", {
"ignoreRefs": true,
"allowArrowFunctions": false,
"allowBind": false
}],
// Forbid the use of dev packages
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md
"import/no-extraneous-dependencies": ["error", {
"devDependencies": ["!**/*.test.js", "!**/*.spec.js"]
}],
"import/named": 1,
"import/namespace": 1,
"import/default": 1,
"import/export": 1,
"import/imports-first": 1,
"import/no-duplicates": 1,
"import/prefer-default-export": 1,
"import/order": [
"error", {
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index"
],
"newlines-between": "always"
}
],
"import/no-unresolved": 1,
// enforce braces in arrow function bodies
// http://eslint.org/docs/rules/arrow-body-style
"arrow-body-style": ["warn", "as-needed"],
"no-mixed-operators": [
"error", {
"allowSamePrecedence": true
}
],
"no-debugger": ["warn"],
"global-require": 0,
"no-param-reassign": [2, {
"props": false
}],
// prevent jsx-a11y error for Link router component without href param
// https://github.com/ReactTraining/react-router/issues/5598
"jsx-a11y/anchor-is-valid": [ "error", {
"components": [ "Link" ],
"specialLink": [ "to" ]
}],
/* FLOWTYPE RULES */
"flowtype/define-flow-type": 1,
"flowtype/use-flow-type": 1,
"flowtype/valid-syntax": 1
},
"globals" : {
"window": true,
"google": true /* because of added and initialized Google Maps package */
}
}