-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
65 lines (65 loc) · 2.11 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
{
"env": {
"browser": true,
"es2021": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"prettier"
],
"overrides": [
{
"files": ["src/test/**/*.ts"],
"plugins": ["jest"],
"extends": ["plugin:jest/recommended"],
"rules": {
"jest/prefer-expect-assertions": "off",
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/prefer-to-have-length": "warn",
"jest/valid-expect": "error",
"jest/no-mocks-import": "off",
"jest/no-export": "off",
"jest/expect-expect": ["error", { "assertFunctionNames": ["expect", "test*"] }]
}
},
{
"files": ["src/test/**/*.tsx"],
"extends": ["plugin:testing-library/react"],
"rules": {
"testing-library/await-async-queries": "error",
"testing-library/no-await-sync-queries": "error",
"testing-library/await-async-utils": "warn",
"testing-library/no-wait-for-side-effects": "warn",
"testing-library/no-debugging-utils": "warn",
"testing-library/no-dom-import": "off",
"testing-library/no-node-access": "off",
"testing-library/no-render-in-lifecycle": ["error", { "allowTestingFrameworkSetupHook": "beforeEach" }],
"testing-library/no-unnecessary-act": ["warn", { "isStrict": false }],
"testing-library/prefer-screen-queries": "off",
"testing-library/prefer-presence-queries": ["error", { "absence": false, "presence": true }],
"testing-library/no-wait-for-multiple-assertions": "warn",
"testing-library/no-container": "off"
}
}
],
"rules": {
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/no-explicit-any": "warn",
"no-fallthrough": ["error", { "allowEmptyCase": true }]
}
}