Skip to content

Commit 21f35ff

Browse files
committed
Solhint fix
1 parent 538eb81 commit 21f35ff

File tree

4 files changed

+22
-9
lines changed

4 files changed

+22
-9
lines changed

.solhint.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"extends": "solhint:default",
2+
"extends": "solhint:recommended",
33
"plugins": [],
44
"rules": {
5+
"compiler-version": "off",
56
"const-name-snakecase": "off",
67
"avoid-suicide": "error",
78
"avoid-sha3": "warn",
8-
"avoid-tx-origin:": "warn",
99
"not-rely-on-time": "warn",
1010
"not-rely-on-block-hash": "warn"
1111
}

contracts/Greeter.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pragma solidity ^0.8.1;
44
import "hardhat/console.sol";
55

66
contract Greeter {
7-
string greeting;
7+
string public greeting;
88

99
constructor(string memory _greeting) public {
1010
console.log("Deploying a Greeter with greeting:", _greeting);

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"prepare": "env-prompt -d .env.sample",
2525
"build": "yarn run clean && yarn run env && yarn run compile && yarn run typechain",
2626
"lint": "npx solhint contracts/**/*.sol",
27+
"lint:fix": "npx solhint contracts/**/*.sol --fix",
2728
"clean": "rm -rf artifacts cache coverage && npx hardhat clean",
2829
"compile": "npx hardhat compile",
2930
"deploy": "npx hardhat deploy --export-all './deployments/deployments.json'",
@@ -61,7 +62,7 @@
6162
"hardhat-deploy": "^0.9.0",
6263
"hardhat-gas-reporter": "^1.0.4",
6364
"mocha": "^8.4.0",
64-
"solhint": "^3.3.4",
65+
"solhint": "^3.3.6",
6566
"solidity-coverage": "^0.7.16",
6667
"ts-generator": "^0.1.1",
6768
"ts-node": "^9.1.1",

yarn.lock

+17-5
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,13 @@
10471047
resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.12.2.tgz#1afad367cb29a2ed8cdd4a3a62701c2821fb578f"
10481048
integrity sha512-d7VS7PxgMosm5NyaiyDJRNID5pK4AWj1l64Dbz0147hJgy5k2C0/ZiKK/9u5c5K+HRUVHmp+RMvGEjGh84oA5Q==
10491049

1050+
"@solidity-parser/parser@^0.13.2":
1051+
version "0.13.2"
1052+
resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.13.2.tgz#b6c71d8ca0b382d90a7bbed241f9bc110af65cbe"
1053+
integrity sha512-RwHnpRnfrnD2MSPveYoPh8nhofEvX7fgjHk1Oq+NNvCcLx4r1js91CO9o+F/F3fBzOCyvm8kKRTriFICX/odWw==
1054+
dependencies:
1055+
antlr4ts "^0.5.0-alpha.4"
1056+
10501057
"@szmarczak/http-timer@^1.1.2":
10511058
version "1.1.2"
10521059
resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421"
@@ -1479,6 +1486,11 @@ [email protected]:
14791486
resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.7.1.tgz#69984014f096e9e775f53dd9744bf994d8959773"
14801487
integrity sha512-haHyTW7Y9joE5MVs37P2lNYfU2RWBLfcRDD8OWldcdZm5TiCE91B5Xl1oWSwiDUSd4rlExpt2pu1fksYQjRBYQ==
14811488

1489+
antlr4ts@^0.5.0-alpha.4:
1490+
version "0.5.0-alpha.4"
1491+
resolved "https://registry.yarnpkg.com/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz#71702865a87478ed0b40c0709f422cf14d51652a"
1492+
integrity sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==
1493+
14821494
anymatch@~3.1.1, anymatch@~3.1.2:
14831495
version "3.1.2"
14841496
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716"
@@ -8511,12 +8523,12 @@ solc@^0.6.3:
85118523
semver "^5.5.0"
85128524
tmp "0.0.33"
85138525

8514-
solhint@^3.3.4:
8515-
version "3.3.4"
8516-
resolved "https://registry.yarnpkg.com/solhint/-/solhint-3.3.4.tgz#81770c60eeb027e6e447cb91ed599baf5e888e09"
8517-
integrity sha512-AEyjshF/PC6kox1c1l79Pji+DK9WVuk5u2WEh6bBKt188gWa63NBOAgYg0fBRr5CTUmsuGc1sGH7dgUVs83mKw==
8526+
solhint@^3.3.6:
8527+
version "3.3.6"
8528+
resolved "https://registry.yarnpkg.com/solhint/-/solhint-3.3.6.tgz#abe9af185a9a7defefba480047b3e42cbe9a1210"
8529+
integrity sha512-HWUxTAv2h7hx3s3hAab3ifnlwb02ZWhwFU/wSudUHqteMS3ll9c+m1FlGn9V8ztE2rf3Z82fQZA005Wv7KpcFA==
85188530
dependencies:
8519-
"@solidity-parser/parser" "^0.12.0"
8531+
"@solidity-parser/parser" "^0.13.2"
85208532
ajv "^6.6.1"
85218533
antlr4 "4.7.1"
85228534
ast-parents "0.0.1"

0 commit comments

Comments
 (0)