-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc
86 lines (83 loc) · 2.43 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
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
{
"root": true,
"plugins": [
"@typescript-eslint",
"import",
"simple-import-sort",
"react",
"jsx-a11y"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
// "plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:eslint-comments/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:jsx-a11y/recommended",
// "plugin:react/recommended",
// "plugin:react-hooks/recommended",
// "plugin:node/recommended",
// "plugin:jest/recommended",
"prettier"
],
"rules": {
// runtime errors
"import/no-unresolved": 2,
"import/namespace": 2,
"import/default": 2,
"import/export": 2,
// // red flags (thus, warnings)
// "import/no-named-as-default": 1,
// "import/no-named-as-default-member": 1,
// "import/no-duplicates": 1,
// auto-fixable import order
"simple-import-sort/imports": [
"error",
{
"groups": [
// Side effect imports.
["^\\u0000"],
// `react` related packages come first.
["^react$", "^react-dom$"],
// Things that start with a letter (or digit or underscore), or `@` followed by a letter.
["^@?\\w"],
// Absolute imports and other imports such as Vue-style `@/foo`.
// Anything not matched in another group.
["^"],
// Relative imports.
// Anything that starts with a dot.
["^\\."],
// type imports last as a separate group
["^.+\\u0000$"]
]
}
],
"simple-import-sort/exports": "error",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-named-as-default": "error",
"import/no-named-as-default-member": "error",
"import/no-duplicates": "error",
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/consistent-type-imports": [
1,
{ "prefer": "type-imports" }
]
// "settings": {
// "react": {
// "version": "detect"
// },
// "import/resolver": {
// "node": {
// "extensions": [".js", ".jsx", ".ts", ".tsx"],
// "project": ["tsconfig.base.json", "packages/*/tsconfig.json"]
// },
// "typescript": {
// "alwaysTryTypes": true,
// "project": ["tsconfig.base.json", "packages/*/tsconfig.json"]
// }
// }
// }
}
}