-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.json
68 lines (68 loc) · 1.96 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
{
"extends": "next",
"plugins": ["import", "visualize-admin", "jest", "deprecate"],
"rules": {
"no-restricted-imports": [
"error",
{
"name": "lodash",
"message": "Please use direct imports instead, ex: lodash/mapValues, lodash/groupBy."
},
{
"name": "d3",
"message": "Please use imports from individual d3 libraries, e.g. import { ascending } from 'd3-array'."
}
],
"react/display-name": "off",
"jest/no-focused-tests": "error",
"visualize-admin/no-large-sx": "error",
"visualize-admin/make-styles": "error",
"@next/next/no-html-link-for-pages": ["error", "app/pages/"],
"deprecate/member-expression": [
"error",
{ "name": "useMemo", "use": "named import" },
{ "name": "useState", "use": "named import" },
{ "name": "useContext", "use": "named import" },
{ "name": "useEffect", "use": "named import" },
{ "name": "createContext", "use": "named import" },
{ "name": "useReducer", "use": "named import" },
{ "name": "memo", "use": "named import" },
{ "name": "forwardRef", "use": "named import" },
{ "name": "useRef", "use": "named import" },
{ "name": "useCallback", "use": "named import" },
{ "name": "useImperativeHandle", "use": "named import" },
{ "name": "createElement", "use": "named import" }
],
"import/order": [
2,
{
"newlines-between": "always",
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index",
"object",
"type"
],
"pathGroups": [
{
"pattern": "@/**",
"group": "internal"
}
],
"pathGroupsExcludedImportTypes": ["builtin"]
}
]
},
"overrides": [
{
"files": ["**/*.docs.tsx"], // Or *.test.js
"rules": {
"import/no-anonymous-default-export": "off"
}
}
]
}