-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.json
72 lines (72 loc) · 1.86 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
{
"root": true,
"extends": [
"plugin:unicorn/recommended",
"next/core-web-vitals",
"prettier"
],
"plugins": ["simple-import-sort", "unicorn"],
"ignorePatterns": [
],
"overrides": [
{
"files": ["**/__tests__/**/*.test.[jt]s?(x)"],
"extends": ["plugin:jest/recommended", "plugin:testing-library/react"],
"rules": {
"jest/consistent-test-it": "error",
"jest/no-mocks-import": "off"
}
},
{
"files": ["*.[t]s?(x)"],
"extends": ["plugin:@typescript-eslint/recommended"],
"rules": {
"@typescript-eslint/explicit-function-return-type": [
"error",
{ "allowedNames": ["getStaticProps", "getStaticPaths"] }
],
"@typescript-eslint/array-type": ["error", { "default": "generic" }],
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"@typescript-eslint/prefer-optional-chain": "warn",
"unicorn/no-useless-undefined": ["error", {
"checkArguments": false
}]
}
},
{
"files": ["**/__mocks__/**/*.[jt]s?(x)"],
"rules": {
"unicorn/no-null": "off",
"unicorn/no-array-callback-reference": "off"
}
}
],
"rules": {
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"no-console": "warn",
"unicorn/no-array-for-each": "warn",
"unicorn/prefer-switch": "error",
"unicorn/prevent-abbreviations": "off",
"unicorn/filename-case": "off",
"unicorn/prefer-module": "off",
"unicorn/numeric-separators-style": "off",
"unicorn/prefer-top-level-await": "off",
"unicorn/no-null": "warn",
"default-case-last": "error",
"default-case": "error"
}
}