aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts')
-rw-r--r--packages/contracts/.solhint.json17
-rw-r--r--packages/contracts/package.json4
2 files changed, 20 insertions, 1 deletions
diff --git a/packages/contracts/.solhint.json b/packages/contracts/.solhint.json
new file mode 100644
index 000000000..7e3b4dca2
--- /dev/null
+++ b/packages/contracts/.solhint.json
@@ -0,0 +1,17 @@
+{
+ "extends": "default",
+ "rules": {
+ "bracket-align": "warn",
+ "code-complexity": "warn",
+ "const-name-snakecase": "warn",
+ "expression-indent": "warn",
+ "function-max-lines": "warn",
+ "statement-indent": "warn",
+ "indent": ["warn", 4],
+ "quotes": ["error", "double"],
+ "max-line-length": ["warn", 120],
+ "separate-by-one-line-in-contract": "warn",
+ "space-after-comma": "error",
+ "func-order": "warn"
+ }
+}
diff --git a/packages/contracts/package.json b/packages/contracts/package.json
index 448871c23..a1abd1059 100644
--- a/packages/contracts/package.json
+++ b/packages/contracts/package.json
@@ -31,7 +31,8 @@
"coverage:report:html": "istanbul report html && open coverage/index.html",
"profiler:report:html": "istanbul report html && open coverage/index.html",
"coverage:report:lcov": "istanbul report lcov",
- "test:circleci": "yarn test"
+ "test:circleci": "yarn test",
+ "lint-contracts": "solhint src/2.0.0/**/*.sol"
},
"config": {
"abis":
@@ -68,6 +69,7 @@
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"solc": "^0.4.24",
+ "solhint": "^1.2.1",
"tslint": "5.8.0",
"typescript": "2.7.1",
"yargs": "^10.0.3"