Skip to content

Commit

Permalink
Merge pull request #1025 from lifinance/lf-12515-improve-solhint
Browse files Browse the repository at this point in the history
LF-12515 Improved Solhint
  • Loading branch information
mirooon authored Mar 3, 2025
2 parents ce8e3b4 + d65e411 commit 958cf06
Show file tree
Hide file tree
Showing 3 changed files with 428 additions and 448 deletions.
39 changes: 34 additions & 5 deletions .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,41 @@
}
],
"code-complexity": ["error", 20],
"compiler-version": ["error", "^0.8.17"],
"const-name-snakecase": "off",
"func-name-mixedcase": "off",
"explicit-types": ["error", "explicit"],
"max-states-count": ["error", 15],
"no-empty-blocks": "error",
"no-global-import": "error",
"no-unused-import": "error",
"no-unused-vars": "error",
"one-contract-per-file": "off",
"payable-fallback": "error",
"reason-string": ["error", { "maxLength": 64 }],
"interface-starts-with-i": "error",
"const-name-snakecase": "error",
"constructor-syntax": "error",
"func-visibility": ["error", { "ignoreConstructors": true }],
"not-rely-on-time": "off",
"reason-string": ["warn", { "maxLength": 64 }]
"contract-name-capwords": "error",
"event-name-capwords": "error",
"func-name-mixedcase": "error",
"immutable-vars-naming": ["error", { "immutablesAsConstants": true }],
"use-forbidden-name": "error",
"var-name-mixedcase": "error",
"imports-on-top": "error",
"visibility-modifier-order": "error",
"gas-custom-errors": "error",
"quotes": ["error","double"],
"avoid-call-value": "off",
"avoid-low-level-calls": "off",
"avoid-sha3": "error",
"avoid-suicide": "error",
"avoid-throw": "error",
"avoid-tx-origin": "error",
"check-send-result": "error",
"compiler-version": ["error", "^0.8.17"],
"func-visibility": ["error", { "ignoreConstructors": true }],
"no-inline-assembly": "off",
"not-rely-on-block-hash": "error",
"reentrancy": "error",
"state-visibility": "error"
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"postinstall-postinstall": "^2.1.0",
"prettier": "^2.6.0",
"prettier-plugin-solidity": "^1.0.0-beta.19",
"solhint": "^3.3.7",
"solhint": "^5.0.5",
"solhint-plugin-prettier": "^0.0.5",
"solidity-coverage": "^0.8.14",
"ts-generator": "^0.1.1",
Expand Down Expand Up @@ -110,7 +110,7 @@
],
"*.sol": [
"prettier --write",
"solhint --fix"
"solhint --noPrompt --fix"
]
}
}
Loading

0 comments on commit 958cf06

Please sign in to comment.