Skip to content

Commit 0eb43e0

Browse files
authored
Merge pull request #93 from kleros/chore/linters
chore: fixed the linters configuration
2 parents d5497ed + 308eb1f commit 0eb43e0

File tree

6 files changed

+22
-19
lines changed

6 files changed

+22
-19
lines changed

.lintstagedrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"*.js": "eslint --cache --fix",
2+
"*.{js,jsx,ts,tsx}": "prettier --write",
33
"*.{md,html,json}": "prettier --write",
44
"*.sol": [
55
"prettier --write",

.vscode/settings.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
{
22
"solidity.compileUsingRemoteVersion": "v0.8.10+commit.fc410830",
3-
"mochaExplorer.files": "contracts/test/**/*.{j,t}s",
43
"cSpell.words": [
54
"arbitrum",
65
"IERC",
7-
"kleros"
8-
]
6+
"kleros",
7+
"typechain"
8+
],
9+
"prettier.configPath": ".prettierrc.json",
10+
"eslint.alwaysShowStatus": true,
11+
"eslint.packageManager": "yarn"
912
}

contracts/.eslintrc.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,23 @@ module.exports = {
66
node: true,
77
},
88
plugins: ["@typescript-eslint"],
9-
extends: ["standard", "plugin:prettier/recommended", "plugin:node/recommended"],
9+
extends: ["standard", "plugin:prettier/recommended", "plugin:node/recommended", "plugin:import/typescript"],
1010
parser: "@typescript-eslint/parser",
1111
parserOptions: {
1212
ecmaVersion: 12,
1313
},
1414
rules: {
15-
"node/no-unsupported-features/es-syntax": ["error", { ignores: ["modules"] }],
15+
"node/no-unsupported-features/es-syntax": [
16+
"error",
17+
{
18+
ignores: ["modules"],
19+
},
20+
],
21+
"node/no-missing-import": [
22+
"error",
23+
{
24+
tryExtensions: [".js", ".ts", ".json", ".node"],
25+
},
26+
],
1627
},
1728
};

contracts/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"./src",
1414
"./scripts",
1515
"./test",
16-
"./typechain",
16+
"./typechain-types",
1717
"./deploy"
1818
],
1919
"files": [

package.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,8 @@
3636
"eslint-utils": "^3.0.0",
3737
"husky": "^7.0.0",
3838
"lint-staged": "^11.0.0",
39-
"npm-run-all": "^4.1.5",
4039
"prettier": "^2.4.1",
4140
"prettier-plugin-solidity": "^1.0.0-beta.15",
42-
"solhint": "^3.3.6",
4341
"solhint-plugin-prettier": "^0.0.5"
4442
},
4543
"resolutions": {
@@ -69,13 +67,6 @@
6967
"scripts": {
7068
"depcheck": "depcheck .",
7169
"changelog": "conventional-changelog --infile CHANGELOG.md --same-file --release-count 0 && prettier --write CHANGELOG.md",
72-
"lint": "run-p -s lint:*",
73-
"lint:js": "eslint .",
74-
"lint:sol": "solhint 'contracts/**/*.sol'",
75-
"fix": "run-p -s fix:*",
76-
"fix:js": "eslint --fix '**/*.js'",
77-
"fix:sol": "prettier --write 'contracts/**/*.sol'",
78-
"prepare": "husky install",
7970
"postinstall": "husky install"
8071
}
8172
}

yarn.lock

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14088,10 +14088,8 @@ __metadata:
1408814088
eslint-utils: ^3.0.0
1408914089
husky: ^7.0.0
1409014090
lint-staged: ^11.0.0
14091-
npm-run-all: ^4.1.5
1409214091
prettier: ^2.4.1
1409314092
prettier-plugin-solidity: ^1.0.0-beta.15
14094-
solhint: ^3.3.6
1409514093
solhint-plugin-prettier: ^0.0.5
1409614094
languageName: unknown
1409714095
linkType: soft
@@ -19839,7 +19837,7 @@ __metadata:
1983919837
languageName: node
1984019838
linkType: hard
1984119839

19842-
"solhint@npm:^3.3.6, solhint@npm:^3.3.7":
19840+
"solhint@npm:^3.3.7":
1984319841
version: 3.3.7
1984419842
resolution: "solhint@npm:3.3.7"
1984519843
dependencies:

0 commit comments

Comments
 (0)