Skip to content

Commit

Permalink
feat: revert to eslint prev version and disable warnings in contract
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedali8 committed Sep 18, 2024
1 parent b5f5f07 commit 9c0012b
Show file tree
Hide file tree
Showing 4 changed files with 253 additions and 205 deletions.
1 change: 0 additions & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"rules": {
"code-complexity": ["error", 8],
"compiler-version": ["error", ">=0.8.0"],
"const-name-snakecase": "off",
"constructor-syntax": "error",
"func-visibility": ["error", { "ignoreConstructors": true }],
"max-line-length": ["error", 120],
Expand Down
4 changes: 3 additions & 1 deletion contracts/Lock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ contract Lock {
event Withdrawal(uint256 amount, uint256 when);

constructor(uint256 _unlockTime) payable {
// solhint-disable-next-line reason-string
// solhint-disable-next-line
require(block.timestamp < _unlockTime, "Unlock time should be in the future");

unlockTime = _unlockTime;
Expand All @@ -22,7 +22,9 @@ contract Lock {
// Uncomment this line, and the import of "hardhat/console.sol", to print a log in your terminal
// console.log("Unlock time is %o and block timestamp is %o", unlockTime, block.timestamp);

// solhint-disable-next-line
require(block.timestamp >= unlockTime, "You can't withdraw yet");
// solhint-disable-next-line
require(msg.sender == owner, "You aren't the owner");

emit Withdrawal(address(this).balance, block.timestamp);
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@
"@types/fs-extra": "^11.0.4",
"@types/mocha": "^10.0.8",
"@types/node": "^22.5.5",
"@typescript-eslint/eslint-plugin": "^8.6.0",
"@typescript-eslint/parser": "^8.6.0",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"chai": "4.5.0",
"chalk": "4.1.2",
"cross-env": "^7.0.3",
"dotenv": "^16.4.5",
"eslint": "^9.10.0",
"eslint-config-prettier": "^9.1.0",
"eslint": "^8.57.1",
"eslint-config-prettier": "^8.10.0",
"ethers": "6.13.2",
"evm-bn": "^1.1.2",
"fs-extra": "^11.2.0",
Expand Down
Loading

0 comments on commit 9c0012b

Please sign in to comment.