-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
75 lines (75 loc) · 2.02 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
{
"env": {
"browser": true,
"jest/globals": true,
"cypress/globals": true,
"es2021": true
},
"extends": ["airbnb", "prettier", "plugin:@next/next/recommended"],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react", "prettier", "react-hooks"],
"rules": {
"import/no-cycle": 1,
"import/prefer-default-export": 1,
"react/react-in-jsx-scope": "off",
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react/jsx-props-no-spreading": "off",
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }]
},
"overrides": [
{
// Limit jest and testing library to /__tests__/ dir
"files": "__tests__/**/*.js",
"extends": [
"airbnb",
"prettier",
"plugin:@next/next/recommended",
"plugin:testing-library/react",
"plugin:jest/all"
],
"plugins": [
"react",
"prettier",
"testing-library",
"react-hooks",
"jest"
],
"rules": {
"react/react-in-jsx-scope": "off",
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react/jsx-props-no-spreading": "off",
"jest/no-hooks": [
"error",
{ "allow": ["afterEach", "afterAll", "beforeEach", "beforeAll"] }
],
"jest/require-hook": [
"error",
{ "allowedFunctionCalls": ["enableFetchMocks"] }
],
"jest/no-commented-out-tests": "warn",
"testing-library/no-render-in-setup": [
"error",
{ "allowTestingFrameworkSetupHook": "beforeEach" }
]
}
},
{
// Limit cypress to /cypress/ dir
"files": "cypress/**/*.js",
"extends": [
"airbnb",
"prettier",
"plugin:@next/next/recommended",
"plugin:cypress/recommended"
],
"plugins": ["react", "prettier", "react-hooks", "cypress"],
"rules": {}
}
]
}