Skip to content

Commit

Permalink
add prettier and solhint
Browse files Browse the repository at this point in the history
  • Loading branch information
maximebrugel committed Dec 31, 2021
1 parent 37642fe commit 54aa9f6
Show file tree
Hide file tree
Showing 4 changed files with 1,058 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules

out/
cache/
.env
20 changes: 20 additions & 0 deletions .solhint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": "solhint:recommended",
"plugins": ["prettier"],
"rules": {
"code-complexity": ["error", 8],
"compiler-version": ["error", ">=0.5.8"],
"const-name-snakecase": "off",
"constructor-syntax": "error",
"func-visibility": ["error", { "ignoreConstructors": true }],
"max-line-length": ["error", 120],
"not-rely-on-time": "off",
"prettier/prettier": [
"error",
{
"endOfLine": "auto"
}
],
"reason-string": ["warn", { "maxLength": 64 }]
}
}
23 changes: 23 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "reverse-liquidity-split",
"author": "Axxe",
"license": "MIT",
"version": "1.0.0",
"files": [
"*.sol"
],
"devDependencies": {
"prettier": "^2.4.1",
"prettier-plugin-solidity": "^1.0.0-beta.18",
"solhint": "^3.3.6",
"solhint-plugin-prettier": "^0.0.5"
},
"scripts": {
"lint": "yarn prettier && yarn solhint",
"lint:check": "yarn prettier:check && yarn solhint:check",
"prettier": "yarn prettier:check --write",
"prettier:check": "prettier --check \"src/**/*.sol\"",
"solhint": "yarn solhint:check --fix",
"solhint:check": "solhint --config ./.solhint.json \"src/**/*.sol\""
}
}
Loading

0 comments on commit 54aa9f6

Please sign in to comment.