forked from LedgerHQ/ledger-live-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
92 lines (89 loc) · 2.53 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
module.exports = {
root: true,
extends: ["@react-native-community", "airbnb", "prettier", "prettier/react"],
settings: {
"import/resolver": {
node: {
extensions: [".js", ".android.js", ".ios.js"],
},
},
},
plugins: ["prettier", "detox"],
rules: {
"no-console": [
"error",
{
allow: ["warn", "error"],
},
],
"no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
vars: "all",
args: "after-used",
ignoreRestSiblings: true,
},
],
"lines-between-class-members": 0,
"flowtype/space-after-type-colon": 0,
"no-continue": 0,
"no-control-regex": 0,
"no-return-assign": 0,
"no-shadow": 0,
"prefer-template": 0,
"no-unused-expressions": 0,
"no-plusplus": 0,
"no-nested-ternary": 0,
"global-require": 0,
"no-restricted-globals": 0,
"no-restricted-syntax": 0,
"import/extensions": 0,
"import/no-mutable-exports": 0,
"import/prefer-default-export": 0,
"no-use-before-define": 0,
"react/sort-comp": 0,
"react/jsx-boolean-value": 0,
"react/prefer-stateless-function": 0,
"react/jsx-filename-extension": 0,
"react/no-multi-comp": 0,
"react/no-unused-state": 0,
"react/no-array-index-key": 0,
"no-await-in-loop": 0,
"class-methods-use-this": 0,
"react/no-unused-prop-types": 0,
"react/require-default-props": 0,
"prefer-destructuring": 0,
"react/destructuring-assignment": 0,
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
// for importing detox
"import/no-extraneous-dependencies": [
"error",
{ devDependencies: ["e2e/**"] },
],
// New rules from default RN 0.61 ruleset
// that were triggered in our codebase
// The following are probably intentional (from my own guesstimate)
"max-classes-per-file": 0,
"react/jsx-curly-brace-presence": 0,
"react/jsx-props-no-spreading": 0,
"react/state-in-constructor": 0,
"react/static-property-placement": 0,
"react/default-props-match-prop-types": 0,
// These ones are good practice we could switch to, so warn only
"eslint-comments/no-unlimited-disable": "warn",
"eslint-comments/no-unused-disable": "warn",
"react-native/no-inline-styles": "warn",
"react/jsx-fragments": "warn",
"react/no-deprecated": "warn",
"prettier/prettier": "error",
},
globals: {
__DEV__: false,
__REDUX_DEVTOOLS_EXTENSION__: false,
fetch: false,
it: false,
expect: false,
},
};