This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
99 lines (99 loc) · 3.1 KB
/
.eslintrc
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
{
"env": {
"es6": true,
"mocha": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@typescript-eslint/strict"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"sourceType": "module"
},
"plugins": ["simple-import-sort", "no-only-tests", "unused-imports", "react"],
"rules": {
"no-case-declarations": "off",
"prefer-arrow-callback": "error",
"@typescript-eslint/prefer-readonly": ["error"],
"@typescript-eslint/ban-tslint-comment": "off",
"@typescript-eslint/explicit-function-return-type": [
"error",
{ "allowExpressions": true, "allowTypedFunctionExpressions": true }
],
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-extra-semi": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-throw-literal": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{ "varsIgnorePattern": "^_", "argsIgnorePattern": "^_" }
],
"import/no-cycle": "error",
"import/no-default-export": "error",
"import/no-extraneous-dependencies": [
"error",
{ "devDependencies": false }
],
"import/no-unresolved": [
"error",
{ "ignore": ["^viem/.*", "^drizzle-orm/.*"] }
],
"import/no-internal-modules": [
"error",
{
"forbid": ["@l2beat/*/**"]
}
],
"no-constant-condition": "off",
"no-only-tests/no-only-tests": "error",
"no-restricted-imports": [
"error",
{
"paths": [".", "..", "../..", "../../.."],
"patterns": [
{
"group": ["ethers/*"],
"message": "Do not import from ethers submodules. For example instead of importing getAddress from ethers/lib/utils, import utils from ethers and use utils.getAddress"
}
]
}
],
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"unused-imports/no-unused-imports": "error",
"eqeqeq": "error",
"react/self-closing-comp": "error"
},
"overrides": [
{
"files": ["**/test/**/*.ts", "*.test.ts"],
"rules": {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/unbound-method": "off",
"import/no-extraneous-dependencies": "off",
"no-unused-expressions": "off"
}
},
{
"files": ["src/**/*.stories.{ts,tsx}"],
"rules": {
"import/no-extraneous-dependencies": "off",
"import/no-default-export": "off"
}
}
]
}