-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
104 lines (103 loc) · 2.6 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
{
"plugins": [
"@typescript-eslint",
"simple-import-sort",
"import",
"jest",
"jest-dom",
"testing-library",
"react-hooks",
"jsx-a11y",
"unicorn",
"promise",
"prettier"
],
"extends": [
"next/core-web-vitals",
// "eslint:recommended",
// Disables conflicting rules from eslint:recommended
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
"plugin:unicorn/recommended",
"plugin:promise/recommended",
// "plugin:jest/recommended",
// "plugin:jest-dom/recommended",
"plugin:testing-library/react",
"plugin:jsx-a11y/recommended",
"plugin:@next/next/recommended",
"prettier"
],
"settings": {
"react": {
"pragma": "React",
"version": "detect"
}
},
"rules": {
/**
* eslint
**/
"no-case-declarations": "off",
"eqeqeq": "error",
/**
* @typescript-eslint
**/
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-empty-function": "off",
/**
* eslint-plugin-import
**/
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
/**
* eslint-plugin-react
**/
"react/prop-types": "error",
"react/no-unescaped-entities": "off",
/**
* eslint-plugin-simple-import-sort
**/
"simple-import-sort/exports": "error",
"simple-import-sort/imports": "error",
/**
* eslint-plugin-unicorn
**/
"unicorn/filename-case": "off",
"unicorn/no-null": "off",
"unicorn/no-useless-undefined": "off",
"unicorn/prefer-module": "off",
"unicorn/prevent-abbreviations": "off",
"unicorn/consistent-function-scoping": "off",
/**
* eslint-plugin-promise
**/
"promise/always-return": "off",
"promise/catch-or-return": ["error", { "allowFinally": true }],
/**
* eslint-plugin-prettier
**/
"prettier/prettier": "off",
/**
* eslint-plugin-next
**/
"@next/next/no-html-link-for-pages": "error",
"@next/next/no-img-element": "off",
/**
* eslint-plugin-jest
**/
"jest/no-done-callback": "off",
/**
* jsx-a11yeslint-plugin-jsx-a11y
*/
// This rule clashes with nextjs Link component so we turn it off
"jsx-a11y/anchor-is-valid": "off"
}
}