-
Notifications
You must be signed in to change notification settings - Fork 227
/
Copy path.eslintrc
88 lines (88 loc) · 2.74 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
87
88
{
// Let eslint know were working as a browser to allow the standard globals (document, window, etc.)
"env": {
"browser": true,
"node": true,
"jest": true
},
// Use AirBnb settings as a base
"extends": [
"@edsc"
],
"rules": {
// Allowing cyclic dependencies
"import/no-cycle": "off",
"import/no-unresolved": [
"error",
{
"ignore": [
"^@edsc/earthdata-react-icons/.+"
]
}
]
},
"overrides": [
{
"files": [
"*.test.js"
],
"rules": {
"import/first": 0
}
},
{
"files": [
"serverless/src/**/*"
],
"rules": {
"import/prefer-default-export": 0
}
},
// These rules are an attempt to prevent testing library linting on non testing library test files and source files.
// It works by assuming any test file we actually want to lint with these rules will be named with extention jsx.
{
"files": [
"tests/**/*.js",
"serverless/**/*",
"static/src/js/components/**/[^_]*/*.jsx",
"static/src/js/**/*.js"
],
"rules": {
"testing-library/await-async-events": "off",
"testing-library/await-async-queries": "off",
"testing-library/await-async-utils": "off",
"testing-library/consistent-data-testid": "off",
"testing-library/no-await-sync-events": "off",
"testing-library/no-await-sync-queries": "off",
"testing-library/no-container": "off",
"testing-library/no-debugging-utils": "off",
"testing-library/no-dom-import": "off",
"testing-library/no-global-regexp-flag-in-query": "off",
"testing-library/no-manual-cleanup": "off",
"testing-library/no-node-access": "off",
"testing-library/no-promise-in-fire-event": "off",
"testing-library/no-render-in-lifecycle": "off",
"testing-library/no-unnecessary-act": "off",
"testing-library/no-wait-for-multiple-assertions": "off",
"testing-library/no-wait-for-side-effects": "off",
"testing-library/no-wait-for-snapshot": "off",
"testing-library/prefer-explicit-assert": "off",
"testing-library/prefer-find-by": "off",
"testing-library/prefer-implicit-assert": "off",
"testing-library/prefer-presence-queries": "off",
"testing-library/prefer-query-by-disappearance": "off",
"testing-library/prefer-query-matchers": "off",
"testing-library/prefer-screen-queries": "off",
"testing-library/prefer-user-event": "off",
"testing-library/render-result-naming-convention": "off"
}
}
],
// Define version settings
"settings": {
"react": {
"pragma": "React",
"version": "16.12.0"
}
}
}