forked from balancer/frontend-v3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
55 lines (51 loc) · 1.48 KB
/
.eslintrc.cjs
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
/* eslint-env node */
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2020,
parser: '@typescript-eslint/parser',
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'next/core-web-vitals',
'plugin:prettier/recommended',
],
plugins: ['@typescript-eslint', 'prettier'],
rules: {
'prettier/prettier': 'warn',
curly: ['error', 'multi-line'],
'no-console': ['off'],
'max-len': ['warn', { code: 120, ignoreComments: true, ignoreUrls: true }],
'@typescript-eslint/no-explicit-any': ['off'],
'no-html-link-for-pages': ['off'],
'no-restricted-imports': [
'error',
{
patterns: [
{
group: ['wagmi'],
importNames: ['useAccount'],
message: 'Use useUserAccount instead to avoid hydration issues',
},
{
group: ['wagmi/dist'],
message: 'Invalid import: remove dist from import path',
},
{
group: ['@apollo/client'],
importNames: ['useQuery'],
message:
// eslint-disable-next-line max-len
'Import useQuery from @apollo/experimental-nextjs-app-support/ssr to avoid u.inFlightLinkObservables errors',
},
{
group: ['act'],
importNames: ['react-dom/test-utils'],
message: "Invalid import: import from '@testing-library/react' instead",
},
],
},
],
},
}