-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.json
75 lines (75 loc) · 2.24 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
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
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "simple-import-sort", "import", "react", "react-memo", "react-hooks"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@next/next/recommended",
"prettier",
"next/core-web-vitals"
],
"ignorePatterns": ["*/public", "*/node_modules/*", "*/.next/*", "*/dist/*"],
"rules": {
"react/display-name": "off",
// The next two rules should be errors. But for now we"ll leave them as warnings since this will take a while
"react-memo/require-usememo": "error",
"react-memo/require-memo": "error",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/member-ordering": [
"warn",
{
"interfaces": ["signature", "method", "constructor", "field"],
"typeLiterals": ["signature", "method", "constructor", "field"]
}
],
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"import/order": "off",
"no-irregular-whitespace": "off",
"@typescript-eslint/no-unused-vars": ["warn", {"argsIgnorePattern": "^_"}],
"object-curly-spacing": ["error", "never"],
"react/jsx-curly-brace-presence": [2, "never"],
"react/jsx-no-duplicate-props": "error",
"react/jsx-sort-props": "error",
"react/react-in-jsx-scope": "off",
"react/no-unescaped-entities": "off",
"simple-import-sort/exports": "error",
"simple-import-sort/imports": "error",
"sort-imports": "off",
"jsx-a11y/no-onchange": "off",
"jsx-a11y/no-autofocus": "off",
"@next/next/no-img-element": "off"
},
"settings": {
"react": {
"pragma": "React",
"version": "detect"
}
},
"overrides": [
{
"files": ["**/*.tsx"],
"rules": {
"react/prop-types": "off"
}
},
{
"files": ["**/*.js"],
"rules": {
"@typescript-eslint/no-var-requires": "off"
}
}
]
}