Skip to content

Commit 7c0c6d0

Browse files
committed
chore: linters config
1 parent a1e27dc commit 7c0c6d0

File tree

7 files changed

+57
-12
lines changed

7 files changed

+57
-12
lines changed

.codeclimate.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,17 @@ engines:
44
checks:
55
quotemark:
66
enabled: false
7+
eslint:
8+
enabled: true
9+
config:
10+
config:
11+
- web/.eslintrc.json
12+
- eslint-config/.eslintrc.js
13+
extensions:
14+
- .es6
15+
- .js
16+
- .jsx
17+
- .mjs
18+
- .vue
719
exclude_paths:
820
- "web/src/graphql/generated.ts"

eslint-config/.eslintrc.js

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,23 @@ module.exports = {
1010
mocha: true,
1111
es2020: true,
1212
},
13-
extends: [
14-
"eslint:recommended",
15-
"plugin:@typescript-eslint/recommended",
16-
"plugin:prettier/recommended",
17-
"plugin:import/recommended",
18-
],
13+
extends: ["eslint:recommended", "plugin:prettier/recommended", "plugin:import/recommended"],
1914
plugins: ["@typescript-eslint", "prettier", "import"],
15+
overrides: [
16+
{
17+
files: ["*.ts", "*.tsx"],
18+
extends: [
19+
"plugin:@typescript-eslint/recommended",
20+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
21+
],
22+
parserOptions: {
23+
project: ["./tsconfig.json"],
24+
},
25+
rules: {
26+
"@typescript-eslint/return-await": ["error", "always"],
27+
},
28+
},
29+
],
2030
rules: {
2131
"no-unused-vars": [
2232
"error",
@@ -44,5 +54,6 @@ module.exports = {
4454
tryExtensions: [".js", ".ts", ".json", ".node"],
4555
},
4656
],
57+
"no-return-await": "off",
4758
},
4859
};

eslint-config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"eslint-utils": "^3.0.0"
1919
},
2020
"devDependencies": {
21-
"typescript": "^4.9.5"
21+
"@kleros/kleros-v2-tsconfig": "*"
2222
},
2323
"peerDependencies": {
2424
"eslint": "8.x"

tsconfig/.eslintrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

web/.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/hooks/contracts/generated.ts

web/.eslintrc.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,29 @@
3434
"security",
3535
"import"
3636
],
37+
"overrides": [
38+
{
39+
"files": [
40+
"*.ts",
41+
"*.tsx"
42+
],
43+
"extends": [
44+
"plugin:@typescript-eslint/recommended",
45+
"plugin:@typescript-eslint/recommended-requiring-type-checking"
46+
],
47+
"parserOptions": {
48+
"project": [
49+
"./tsconfig.json"
50+
]
51+
},
52+
"rules": {
53+
"@typescript-eslint/return-await": [
54+
"error",
55+
"always"
56+
]
57+
}
58+
}
59+
],
3760
"ignorePatterns": [
3861
"src/assets"
3962
],
@@ -83,6 +106,7 @@
83106
]
84107
}
85108
],
109+
"no-return-await": "off",
86110
"@typescript-eslint/no-non-null-assertion": "off",
87111
"@typescript-eslint/no-explicit-any": "off",
88112
"security/detect-object-injection": "off",

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5197,6 +5197,7 @@ __metadata:
51975197
version: 0.0.0-use.local
51985198
resolution: "@kleros/kleros-v2-eslint-config@workspace:eslint-config"
51995199
dependencies:
5200+
"@kleros/kleros-v2-tsconfig": "*"
52005201
"@typescript-eslint/eslint-plugin": ^5.59.11
52015202
"@typescript-eslint/parser": ^5.61.0
52025203
"@typescript-eslint/utils": ^5.59.11
@@ -5208,7 +5209,6 @@ __metadata:
52085209
eslint-plugin-promise: ^5.2.0
52095210
eslint-plugin-security: ^1.7.1
52105211
eslint-utils: ^3.0.0
5211-
typescript: ^4.9.5
52125212
peerDependencies:
52135213
eslint: 8.x
52145214
languageName: unknown
@@ -5236,7 +5236,7 @@ __metadata:
52365236
languageName: unknown
52375237
linkType: soft
52385238

5239-
"@kleros/kleros-v2-tsconfig@workspace:^, @kleros/kleros-v2-tsconfig@workspace:tsconfig":
5239+
"@kleros/kleros-v2-tsconfig@*, @kleros/kleros-v2-tsconfig@workspace:^, @kleros/kleros-v2-tsconfig@workspace:tsconfig":
52405240
version: 0.0.0-use.local
52415241
resolution: "@kleros/kleros-v2-tsconfig@workspace:tsconfig"
52425242
dependencies:

0 commit comments

Comments
 (0)