-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.json
93 lines (93 loc) · 2.33 KB
/
.eslintrc.json
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
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"jest": true,
"node": true,
"react-native/react-native": true
},
"extends": [
"eslint:recommended",
"plugin:flowtype/recommended",
"plugin:import/errors",
"plugin:prettier/recommended",
"plugin:promise/recommended",
"plugin:react/recommended",
"plugin:react-native/all",
"prettier/react"
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2017,
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"sourceType": "module"
},
"plugins": ["babel", "flowtype", "import", "prettier", "promise", "react", "react-native"],
"rules": {
"array-callback-return": "warn",
"babel/no-unused-expressions": "error",
"consistent-return": "warn",
"eqeqeq": ["warn", "always", { "null": "ignore" }],
"import/no-unused-modules": "off",
"no-console": [
"error",
{
"allow": ["warn", "error", "info"]
}
],
"no-duplicate-imports": "warn",
"no-throw-literal": "error",
"no-unused-vars": [
"warn",
{
"args": "none"
}
],
"no-var": "warn",
"no-warning-comments": "off",
"prefer-const": "warn",
"prefer-promise-reject-errors": "warn",
"prettier/prettier": "warn",
"promise/catch-or-return": "off",
"react/default-props-match-prop-types": [
"warn",
{
"allowRequiredDefaults": true
}
],
"react/display-name": "off",
"react/no-string-refs": "off",
"react/no-unsafe": "warn",
"react/no-unused-prop-types": "warn",
"react/no-unused-state": "warn",
"react-native/no-color-literals": "off",
"react-native/no-inline-styles": "off",
"react-native/no-raw-text": "off",
"react-native/no-unused-styles": "warn",
"react-native/sort-styles": "off",
"react-native/split-platform-components": "off",
"require-await": "warn"
},
"settings": {
"flowtype": {
"onlyFilesWithFlowAnnotation": true
},
"import/ignore": [
"node_modules/react-native/index\\.js$"
],
"import/resolver": {
"babel-module": {},
"node": {
"extensions": [".android.js", ".ios.js", ".js", ".jsx"],
"moduleDirectory": ["node_modules", "app"]
}
},
"react": {
"version": "detect"
}
}
}