-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.json
48 lines (47 loc) · 1.33 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
39
40
41
42
43
44
45
46
47
48
{
"extends": [
"next/core-web-vitals",
"prettier",
"plugin:testing-library/react",
"plugin:jest-dom/recommended",
"plugin:react/recommended"
],
"plugins": ["@typescript-eslint"],
"rules": {
"no-unused-vars": "off",
"react/react-in-jsx-scope": "off", // Disable the rule that requires importing React when using JSX
"no-unused-expressions": "error",
"@typescript-eslint/no-unused-vars": "error",
"import/no-unresolved": "error",
"import/named": "error",
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
"react/no-unknown-property": ["error", { "ignore": ["jsx"] }],
"react/jsx-props-no-spreading": [
"error",
{
"html": "enforce",
"custom": "ignore",
"exceptions": ["Image"] // Add exceptions for specific components
}
],
"react/prop-types": "off", // Disable prop-types rule if you are using TypeScript
"react/jsx-handler-names": [
"error",
{
"eventHandlerPrefix": "handle", // Customize event handler naming convention if needed
"eventHandlerPropPrefix": "on" // Customize event handler prop prefix if needed
}
],
"camelcase": [
"error",
{
"allow": ["^data-", "^aria-"]
}
]
},
"settings": {
"react": {
"version": "detect"
}
}
}