-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.json
147 lines (147 loc) · 4.21 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
137
138
139
140
141
142
143
144
145
146
147
{
"env": {
"browser": true,
"es6": true,
"jest": true,
"node": true
},
"extends": [
"airbnb",
"airbnb-typescript",
"airbnb/hooks",
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended",
"plugin:jest-formatting/recommended"
],
"parserOptions": {
"project": "./tsconfig.json"
},
"plugins": [
"react",
"babel",
"react-hooks",
"jest",
"jest-formatting",
"import",
"simple-import-sort"
],
"rules": {
"babel/semi": "warn",
"import/no-cycle": "warn",
"import/order": "off",
"import/prefer-default-export": "warn",
"jest/consistent-test-it": [
"error",
{
"fn": "test"
}
],
"max-len": [
"off",
{
"code": 100,
"ignoreStrings": true,
"ignoreUrls": true
}
],
"no-console": [
"error",
{
"allow": [
"warn",
"error"
]
}
],
"no-continue": "warn",
"no-param-reassign": "warn",
"no-plusplus": [
"error",
{
"allowForLoopAfterthoughts": true
}
],
"no-underscore-dangle": "off",
"padding-line-between-statements": [
"error",
{
"blankLine": "always",
"next": "block-like",
"prev": "*"
},
{
"blankLine": "any",
"next": "if",
"prev": "if"
}
],
"prefer-destructuring": "warn",
"prefer-promise-reject-errors": "off",
"react-hooks/exhaustive-deps": "warn",
"react-hooks/rules-of-hooks": "error",
"react/destructuring-assignment": "warn",
"react/forbid-prop-types": [
"warn",
{
"checkChildContextTypes": false,
"checkContextTypes": false,
"forbid": []
}
],
"react/jsx-sort-props": [
"error",
{
"callbacksLast": false,
"shorthandFirst": false,
"shorthandLast": false,
"ignoreCase": true,
"noSortAlphabetically": false,
"reservedFirst": [
"key"
]
}
],
"react/sort-prop-types": [
"error",
{
"callbacksLast": false,
"ignoreCase": false,
"requiredFirst": true,
"sortShapeProp": false,
"noSortAlphabetically": false
}
],
"react/jsx-one-expression-per-line": "off",
"react/no-did-update-set-state": "warn",
"react/sort-comp": "warn",
"react/jsx-props-no-spreading": "off",
"sort-imports": "off",
"simple-import-sort/exports": "error",
"simple-import-sort/imports": "error",
// all rules below are temporarily disabled in order for eslint to pass
// after updating. these should be fixed and re-enabled
"react/function-component-definition": "off",
"react/jsx-no-constructed-context-values": "off",
"react/jsx-no-useless-fragment": "off",
// Default props deprecated in React v16, to be removed v18
"react/require-default-props": "off",
"jest/no-conditional-expect": "off",
"max-classes-per-file": "off",
"no-mixed-operators": "off",
"react/prop-types": "off",
"react/no-unstable-nested-components": "off",
"prefer-object-spread": "off",
"react/static-property-placement": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-shadow": "off",
"@typescript-eslint/default-param-last": "off",
"@typescript-eslint/no-use-before-define": "off"
},
"settings": {
"import/resolver": {
"webpack": {
"config": "config/webpack/common.js"
}
}
}
}