-
-
Notifications
You must be signed in to change notification settings - Fork 185
Expand file tree
/
Copy path.eslintrc
More file actions
76 lines (74 loc) · 1.53 KB
/
Copy path.eslintrc
File metadata and controls
76 lines (74 loc) · 1.53 KB
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
{
"root": true,
"extends": [
"eslint:recommended",
"react-app",
"plugin:prettier/recommended"
],
"plugins": [
"unused-imports",
"prettier"
],
"globals": {
"DEV": false,
"MOCK_GRAPHQL__": false,
"drupalSettings": false,
"xdescribe": false,
"xit": false
},
"rules": {
/** Let Prettier handle all formatting */
"prettier/prettier": "error",
/** Keep your existing logic / code-quality rules */
"no-mixed-operators": 0,
"import/first": 0,
"prefer-promise-reject-errors": 0,
"react/prop-types": 0,
"react/jsx-no-bind": 0,
/** unused-imports setup */
"unused-imports/no-unused-imports": "error",
"no-unused-vars": "off",
"unused-imports/no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
]
},
"overrides": [
{
/** Node / backend scripts, migration, etc. */
"files": [
"migrate.js",
"migration/**/*",
"scripts/**/*",
"*.config.js"
],
"env": {
"node": true
}
},
{
/** Frontend React (if you want to be explicit) */
"files": [
"frontend/**/*.{js,jsx,ts,tsx}"
],
"env": {
"browser": true
}
},
{
/** Tests (if you use Jest / testing libs) */
"files": [
"**/*.test.{js,jsx,ts,tsx}",
"**/__tests__/**/*.{js,jsx,ts,tsx}"
],
"env": {
"jest": true
}
}
]
}