-
Notifications
You must be signed in to change notification settings - Fork 17
/
.eslintrc.json
87 lines (87 loc) · 2.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
{
"extends": [
"eslint:recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"env": {
"browser": true,
"es2022": true,
"node": false
},
"rules": {
"@typescript-eslint/consistent-type-imports": "error",
"no-console": ["error", { "allow": ["error"] }],
"no-inner-declarations": "off",
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
"import/extensions": ["error", "ignorePackages"],
"import/no-duplicates": ["error"],
"import/no-unresolved": "off", // Typescript does this better!
"import/order": [
"error",
{
"alphabetize": {
"order": "asc",
"orderImportKind": "desc"
},
"newlines-between": "always",
"warnOnUnassignedImports": true
}
],
"react-hooks/exhaustive-deps": [
"warn",
{
"additionalHooks": "(useEditorEffect|useLayoutGroupEffect$)"
}
],
"sort-imports": [
"error",
{
"allowSeparatedGroups": true,
"ignoreDeclarationSort": true
}
]
},
"settings": {
"import/extensions": [".js", ".jsx", ".ts", ".tsx"],
"import/external-module-folders": [".yarn"],
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"react": {
"version": "detect"
}
},
"overrides": [
{
"files": ["src/**/__tests__/**/*"],
"extends": ["plugin:jest/recommended", "plugin:jest/style"],
"env": {
"jest": true,
"node": true
},
"rules": {
"jest/consistent-test-it": ["error"],
"jest/no-commented-out-tests": "warn",
"jest/no-conditional-expect": "warn",
"jest/no-done-callback": "warn",
"jest/no-mocks-import": "warn",
"jest/no-standalone-expect": "warn",
"jest/require-top-level-describe": "warn",
"jest/valid-title": "warn"
}
},
{
"files": ["**/*.cjs"],
"env": {
"commonjs": true
}
}
]
}