-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.json
48 lines (48 loc) · 1.45 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",
"plugins": [
"simple-import-sort",
"unused-imports",
"import",
"prefer-arrow-functions"
],
"rules": {
"no-console": "warn",
"simple-import-sort/exports": "error",
"unused-imports/no-unused-imports": "error",
"import/no-anonymous-default-export": "off",
"import/no-duplicates": "error",
"react/display-name": "off",
"prefer-arrow-functions/prefer-arrow-functions": [
"warn",
{
"classPropertiesAllowed": false,
"disallowPrototype": false,
"returnStyle": "unchanged",
"singleReturnOnly": false
}
],
"simple-import-sort/imports": [
"error",
{
"groups": [
// Side effect imports.
["^\\u0000"],
["^react(/.*)?$"],
["^@/components(/.*)?$"],
["^@/types", "^\\u0000$"],
["^@/utils(/.*)?$"],
["^@/consts(/.*)?$"],
/** Start general imports https://github.com/lydell/eslint-plugin-simple-import-sort/blob/main/examples/.eslintrc.js */
// Things that start with a letter (or digit or underscore), or `@` followed by a letter.
["^@?\\w"],
// Parent imports. Put `..` last.
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
// Other relative imports. Put same-folder imports and `.` last.
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"]
/** End of general imports */
]
}
]
}
}