-
Notifications
You must be signed in to change notification settings - Fork 9
/
.eslintrc.json
38 lines (38 loc) · 1.22 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
{
"env": {
"browser": true,
"es2021": true,
"jest": true,
"node": true
},
"extends": ["airbnb", "airbnb-typescript", "airbnb/hooks"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"globalReturn": true,
"impliedStrict": true,
"jsx": true
},
"project": "./tsconfig.json",
"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='||']"
}
],
"react/jsx-props-no-spreading": "off",
"react/react-in-jsx-scope": "off",
"react/require-default-props": "off"
},
"settings": {
"import/resolver": "webpack"
}
}