-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
85 lines (84 loc) · 1.93 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
77
78
79
80
81
82
83
84
85
{
"parser": "@typescript-eslint/parser",
"extends": [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"eslint:recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"prettier"
],
"plugins": ["@typescript-eslint", "import", "unused-imports"],
"rules": {
// Disable rule TS2352
"@typescript-eslint/explicit-module-boundary-types": "off",
"import/no-named-as-default": 0,
"react/prop-types": "off",
"no-console": "off",
"newline-before-return": "error",
"no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-unused-vars": ["off", { "ignoreRestSiblings": true }],
// eslint-plugin-import
"import/first": "error",
"import/namespace": "off",
"import/newline-after-import": ["error", { "count": 1 }],
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal", "parent", "sibling", "index"],
"newlines-between": "always",
"pathGroups": [
{
"pattern": "react",
"group": "builtin",
"position": "before"
},
{
"pattern": "../**",
"group": "internal",
"position": "before"
},
{
"pattern": "@/*",
"group": "internal",
"position": "after"
}
],
"pathGroupsExcludedImportTypes": ["builtin"],
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
// eslint-plugin-unused-imports
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
]
},
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"typescript": true,
"node": true
}
},
"globals": {
"React": true,
"JSX": true
}
}