-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy path.eslintrc.json
136 lines (135 loc) · 4.04 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
{
"env": {
"browser": true,
"es2021": true,
"jest": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:jest/style",
"plugin:jest/recommended",
"plugin:import/recommended",
"plugin:import/typescript"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "react", "jest"],
"globals": {
"PRODUCTION": true,
"TEST": true
},
"rules": {
"no-unused-vars": ["error", { "varsIgnorePattern": "connect|[A|a]ction" }],
"jest/no-disabled-tests": "warn",
"jest/import-default": "off",
"jest/no-identical-title": "error",
"jest/valid-expect": "error",
"jest/consistent-test-it": "error",
"jest/expect-expect": "error",
"jest/no-test-prefixes": "error",
"jest/prefer-to-have-length": "error",
"arrow-body-style": "off",
"no-mixed-operators": "off",
"arrow-parens": "off",
"comma-dangle": "off",
"no-confusing-arrow": "off",
"key-spacing": ["error", { "beforeColon": false }],
"import/named": "off",
"import/prefer-default-export": "off",
"import/prefer-default-import": "off",
"jsx-a11y/alt-text": "off",
"jsx-a11y/anchor-is-valid": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/heading-has-content": "off",
"jsx-a11y/href-no-hash": "off",
"jsx-a11y/label-has-associated-control": "off",
"jsx-a11y/label-has-for": "off",
"jsx-a11y/no-autofocus": "off",
"jsx-a11y/no-noninteractive-element-interactions": "off",
"jsx-a11y/no-static-element-interactions": "off",
"react/button-has-type": "off",
"react/default-props-match-prop-types": "off",
"react/destructuring-assignment": "off",
"react/forbid-prop-types": "off",
"react/jsx-filename-extension": "off",
"react/jsx-no-bind": "off",
"react/jsx-no-target-blank": "off",
"react/no-access-state-in-setstate": "off",
"react/no-array-index-key": "off",
"react/no-did-mount-set-state": "off",
"react/no-did-update-set-state": "off",
"react/no-multi-comp": "off",
"react/no-unused-prop-types": "off",
"react/no-unused-state": "off",
"react/prefer-stateless-function": "off",
"react/require-default-props": "off",
"react/sort-comp": "off",
"react/display-name": "off",
"implicit-arrow-linebreak": "off",
"react/jsx-closing-tag-location": "off",
"jest/no-focused-tests": "error",
"prefer-destructuring": "off",
"prefer-object-spread": 2,
"func-names": "off",
"global-require": "off",
"new-cap": [
"error",
{
"newIsCapExceptions": ["mnemonic"]
}
],
"react/prop-types": "off",
"no-plusplus": "off",
"no-underscore-dangle": "off",
"linebreak-style": 0,
"no-param-reassign": "off",
"complexity": ["error", 10],
"max-depth": ["error", 3],
"max-nested-callbacks": ["error", 3],
"max-statements": ["error", 10],
"max-lines": ["error", 300]
},
"ignorePatterns": ["*.config.js", "locales/*", "scripts/*", "*test.js"],
"overrides": [
{
"files": ["*.test.js"],
"env": {
"jest": true
}
}
],
"settings": {
"react": {
"version": "detect"
},
"mocha/additionalTestFunctions": ["describeModule"],
"import/ignore": ["react"],
"import/resolver": {
"typescript": true,
"alias": {
"map": [
["contexts", "./src/contexts"],
["constants", "./src/constants"],
["components", "./src/components"],
["assets", "./src/assets"],
["utilities", "./src/utilities"],
["actions", "./src/actions"],
["navigation", "./src/navigation"],
["modules", "./src/modules"],
["hooks", "./src/hooks"],
["store", "./src/store"],
["tests", "./src/tests"],
["locales", "./locales"]
],
"extensions": [".js", ".jsx", ".json"]
}
}
}
}