-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
90 lines (88 loc) · 2.58 KB
/
.eslintrc.js
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
module.exports = {
extends: [
"eslint:recommended",
"plugin:@next/next/recommended",
"airbnb",
"next/core-web-vitals",
"prettier",
"plugin:jsx-a11y/recommended",
],
plugins: ["react", "prettier"],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2020,
sourceType: "module",
},
rules: {
"no-underscore-dangle": "off",
"import/prefer-default-export": "off",
"react/jsx-no-bind": "off",
"react/no-unescaped-entities": "off",
"prettier/prettier": "error",
"react/react-in-jsx-scope": "off",
"react/jsx-props-no-spreading": "off",
"react/forbid-prop-types": "off",
"object-shorthand": "off",
"no-use-before-define": "off",
"react/require-default-props": [
"error",
{
ignoreFunctionalComponents: true,
},
],
"react/jsx-pascal-case": [
2,
{
ignore: ["UNSAFE_Combobox"],
},
],
singleQuote: "off",
//TODO: Fix these errors!
"consistent-return": "warn",
"react/jsx-filename-extension": "warn",
"import/no-cycle": "warn",
"react/jsx-no-constructed-context-values": "warn",
"jsx-a11y/anchor-is-valid": "warn",
"react/no-array-index-key": "warn",
"jsx-a11y/no-static-element-interactions": "warn",
"jsx-a11y/click-events-have-key-events": "warn",
},
settings: {
"import/resolver": {
alias: {
extensions: [".js", ".jsx"],
map: [["@/app", "./src/app"]],
},
},
"jsx-a11y": {
polymorphicPropName: "as",
components: {
BodyLong: "p",
BodyShort: "p",
Button: "button",
CheckboxGroup: "fieldset",
Checkbox: "input",
Chips: "ul",
Heading: "h",
Icon: "svg",
IconButton: "button",
Image: "img",
Input: "input",
Link: "a",
List: "ul",
ListItem: "li",
NextImage: "img",
NextLink: "a",
Pagination: "nav",
RadioGroup: "fieldset",
Radio: "input",
Select: "select",
TextField: "input",
Textarea: "textarea",
Tooltip: "button",
},
},
},
};