-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
76 lines (75 loc) · 2.39 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
76
{
"extends": ["next", "next/core-web-vitals", "prettier", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"rules": {
"import/extensions": "off",
"import/no-cycle": "warn",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true,
"optionalDependencies": false,
"peerDependencies": false
}
],
"import/no-named-as-default": "warn",
"import/no-named-as-default-member": "warn",
"import/no-unresolved": "off",
"import/no-useless-path-segments": "warn",
"import/order": "off",
"import/prefer-default-export": "warn",
"no-duplicate-imports": "warn",
"no-empty-function": "off",
"no-explicit-any": "off",
"no-extra-parens": "off",
"no-lone-blocks": "warn",
"prefer-arrow-callback": "error",
"prefer-const": "warn",
"prefer-template": "error",
"react/destructuring-assignment": "warn",
"react/function-component-definition": [
2,
{
"namedComponents": "arrow-function"
}
],
"react/jsx-curly-brace-presence": "warn",
"react/jsx-filename-extension": "off",
// "react/jsx-fragments": [2, "element"],
"react/jsx-indent": "off",
"react/jsx-indent-props": "off",
"react/jsx-one-expression-per-line": "off",
"react/jsx-props-no-spreading": "off",
"react/jsx-sort-props": [
"warn",
{
"ignoreCase": true,
"reservedFirst": false,
"noSortAlphabetically": true
}
],
"react/no-access-state-in-setstate": "warn",
"react/no-array-index-key": "off",
"react/no-did-update-set-state": "off",
"react/no-find-dom-node": "warn",
"react/no-unused-state": "off",
"react/prefer-stateless-function": [
"warn",
{
"ignorePureComponents": true
}
],
"react/prop-types": "off",
"react/require-default-prop": "off",
"react/require-default-props": "off",
"react/self-closing-comp": "warn",
"react/sort-comp": "warn",
"react/static-property-placement": ["warn", "static public field"],
// TypeScript-specific rules
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off"
}
}