-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc
61 lines (60 loc) · 1.64 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
{
"plugins": ["import", "prettier", "simple-import-sort", "ban"],
"extends": [
"react-app",
"airbnb-typescript",
"prettier/react",
"prettier/@typescript-eslint",
"eslint-config-prettier",
"plugin:prettier/recommended"
],
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
"react/require-default-props": "off", // Pending integration of ES6 standard for defaulting props
"no-unused-expressions": [
"warn",
{
"allowShortCircuit": true,
"allowTernary": true
}
],
"import/prefer-default-export": "off",
"simple-import-sort/sort": [
"warn",
{
"groups": [
["^\\u0000", "^react", "^@?\\w"], // Packages. `react` related packages come first.
[
"^(app|components|mock|models|services|utils)(/.*|$)",
"^\\./(?=.*/)(?!/?$)",
"^\\.(?!/?$)",
"^\\./?$"
], // Relative imports. Put same-folder imports and `.` last.
["^.+\\.s?css$"] // Style imports.
]
}
],
"sort-imports": "off", // simple-import-sort takes care of this
"import/order": "off", // simple-import-sort takes care of this
"ban/ban": [
"error",
{ "name": "it", "message": "Usage of 'test()' instead of 'it()' is preferred" }
]
},
"overrides": [
{
"files": ["**/*.test.tsx"],
"rules": {
// Allow when defining a default props object to be used in multiple tests
"react/jsx-props-no-spreading": "off"
}
}
],
"settings": {
"import/resolver": {
"typescript": {} // Fix imports with tsconfig baseUrl
}
}
}