-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.json
34 lines (34 loc) · 1.04 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
{
"env": {
"browser": true,
"es2021": true,
"jest": true,
"node": true
},
"extends": ["airbnb", "airbnb/hooks"],
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaFeatures": {
"globalReturn": true,
"impliedStrict": true,
"jsx": true
},
"sourceType": "module"
},
"rules": {
"no-restricted-syntax": [
"error",
{
"message": "Ternaries must be used instead of && in JSX expressions to avoid the potential for accidental output. Use, for example, {condition ? <Element /> : null}.",
"selector": ":matches(JSXElement, JSXFragment) > JSXExpressionContainer > LogicalExpression[operator='&&']"
},
{
"message": "Ternaries must be used instead of || in JSX expressions to avoid the potential for accidental output. Use, for example, {thing1 ? thing1 : thing2}.",
"selector": ":matches(JSXElement, JSXFragment) > JSXExpressionContainer > LogicalExpression[operator='||']"
}
]
},
"settings": {
"import/resolver": "webpack"
}
}