-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy patheslintrc
109 lines (109 loc) · 2.91 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
// Enabled object spread
"experimentalObjectRestSpread": true
},
"sourceType": "module"
},
"extends": ["airbnb", "prettier", "prettier/react"],
"env": {
"browser": true,
"es6": true
},
"settings": {
"import/resolver": {
"node": {
"extensions": [
".js",
".jsx",
".ts",
".tsx"
]
}
},
},
"rules": {
"camelcase": ["off"],
"class-methods-use-this": ["off"],
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"mjs": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
],
"import/no-extraneous-dependencies": ["off"],
"import/prefer-default-export": ["off"],
"jsx-a11y/click-events-have-key-events": ["off"],
"jsx-a11y/label-has-associated-control": ["off"],
"jsx-a11y/label-has-for": ["off"],
"jsx-a11y/mouse-events-have-key-events": ["off"],
"jsx-a11y/no-noninteractive-element-interactions": ["off"],
"jsx-a11y/no-noninteractive-tabindex": ["off"],
"jsx-a11y/no-static-element-interactions": ["off"],
"jsx-quotes": ["error", "prefer-double"],
"max-len": ["error", { "code": 100, "ignoreComments": true, "ignoreStrings": true }],
"no-else-return": ["error", { "allowElseIf": true }],
"no-console": ["error"],
"no-restricted-syntax": ["off"],
"no-underscore-dangle": ["off"],
"operator-linebreak": ["error", "after", { "overrides": { "?": "before", ":": "before" } }],
"prefer-destructuring": ["off"],
"prefer-promise-reject-errors": ["off"],
"react/button-has-type": ["off"],
"react-hooks/rules-of-hooks": ["error"],
"react-hooks/exhaustive-deps": ["warn"],
"react/jsx-curly-spacing": ["error", { "when": "never", "children": { "when": "never" } }],
"react/jsx-props-no-spreading": ["off"],
"react/no-did-update-set-state": ["off"],
"react/no-unescaped-entities": ["off"], // Should turn this one back on once we pull out the strings from the components
"react/prefer-stateless-function": ["error", { "ignorePureComponents": true }],
"react/prop-types": ["off"],
"react/state-in-constructor": ["off"],
"react/style-prop-object": ["off"],
"quotes": ["error", "single", { "allowTemplateLiterals": true }]
},
"plugins": [
"jest",
"react",
"react-hooks"
],
"overrides": [
{
"files": [
"admin/**/*.js",
"admin/**/*.jsx"
],
"env": {
"jquery": true
},
"rules": {
"no-restricted-globals": [
"off"
],
"no-alert": [
"off"
],
"no-console": [
"off"
]
}
},
{
"files": [
"**/*.test.js",
"**/*.test.jsx"
],
"env": {
"jest": true
}
}
]
}