Skip to content

Commit d8f5286

Browse files
committed
build: use solhint for linting
1 parent ec7f51a commit d8f5286

File tree

6 files changed

+357
-573
lines changed

6 files changed

+357
-573
lines changed

.solhint.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"extends": "solhint:recommended",
3+
"plugins": ["prettier"],
4+
"rules": {
5+
"prettier/prettier": "error",
6+
"func-visibility": ["warn", { "ignoreConstructors": true }],
7+
"compiler-version": ["off"],
8+
"constructor-syntax": "warn",
9+
"quotes": ["error", "double"],
10+
"reason-string": ["off"],
11+
"not-rely-on-time": "off",
12+
"no-empty-blocks": "off"
13+
}
14+
}

.solhintignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node_modules
2+
3+
./contracts/bancor
4+
./contracts/discovery/erc1056
5+
./contracts/rewards/RewardsManager.sol
6+
./contracts/staking/libs/LibFixedMath.sol
7+
./contracts/tests/RewardsManagerMock.sol
8+
./contracts/tests/ens
9+
./contracts/tests/testnet/GSRManager.sol

.soliumignore

-12
This file was deleted.

.soliumrc.json

-11
This file was deleted.

package.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
"eslint-plugin-promise": "^5.0.0",
5656
"eslint-plugin-standard": "^4.1.0",
5757
"ethereum-waffle": "^3.3.0",
58-
"ethlint": "^1.2.5",
5958
"graphql-tag": "^2.12.4",
6059
"hardhat": "^2.2.0",
6160
"hardhat-abi-exporter": "^2.2.0",
@@ -72,6 +71,8 @@
7271
"p-queue": "^6.6.1",
7372
"prettier": "^2.2.1",
7473
"prettier-plugin-solidity": "^1.0.0-beta.9",
74+
"solhint": "^3.3.6",
75+
"solhint-plugin-prettier": "^0.0.5",
7576
"solidity-coverage": "^0.7.16",
7677
"ts-generator": "^0.1.1",
7778
"ts-node": "^9.1.1",
@@ -98,12 +99,12 @@
9899
"lint": "yarn lint:ts && yarn lint:sol",
99100
"lint:fix": "yarn lint:ts:fix && yarn lint:sol:fix",
100101
"lint:ts": "eslint '*/**/*.{js,ts}'",
101-
"lint:ts:fix": "eslint '*/**/*.{js,ts}' --fix",
102-
"lint:sol": "solium --dir ./contracts",
103-
"lint:sol:fix": "solium --dir ./contracts --fix",
102+
"lint:ts:fix": "prettier:ts && eslint '*/**/*.{js,ts}' --fix",
103+
"lint:sol": "solhint './contracts/**/*.sol'",
104+
"lint:sol:fix": "yarn prettier:sol && solhint --fix './contracts/**/*.sol'",
104105
"prettier": "yarn prettier:ts && yarn prettier:sol",
105106
"prettier:ts": "prettier --write 'test/**/*.ts'",
106-
"prettier:sol": "prettier --write 'contracts/*.sol'",
107+
"prettier:sol": "prettier --write 'contracts/**/*.sol'",
107108
"analyze": "scripts/analyze",
108109
"myth": "scripts/myth",
109110
"flatten": "scripts/flatten && scripts/clean",

0 commit comments

Comments
 (0)