diff options
author | Alex Shafranovich <alex@cen.by> | 2018-07-06 01:58:52 +0800 |
---|---|---|
committer | Alex Shafranovich <alex@cen.by> | 2018-07-06 01:58:52 +0800 |
commit | d8c7c9803c92a5069aae73d5fcbcf4920b18e0ab (patch) | |
tree | 7c4040a5705ccbf4f559a2bdabb472ca4c17f30c /packages | |
parent | 87a7a4ad2d55641cbe06d7157df0d8f0996d033a (diff) | |
download | dexon-sol-tools-d8c7c9803c92a5069aae73d5fcbcf4920b18e0ab.tar dexon-sol-tools-d8c7c9803c92a5069aae73d5fcbcf4920b18e0ab.tar.gz dexon-sol-tools-d8c7c9803c92a5069aae73d5fcbcf4920b18e0ab.tar.bz2 dexon-sol-tools-d8c7c9803c92a5069aae73d5fcbcf4920b18e0ab.tar.lz dexon-sol-tools-d8c7c9803c92a5069aae73d5fcbcf4920b18e0ab.tar.xz dexon-sol-tools-d8c7c9803c92a5069aae73d5fcbcf4920b18e0ab.tar.zst dexon-sol-tools-d8c7c9803c92a5069aae73d5fcbcf4920b18e0ab.zip |
Added Solhint package and 'lint-contracts' npm script
Diffstat (limited to 'packages')
-rw-r--r-- | packages/contracts/.solhint.json | 17 | ||||
-rw-r--r-- | packages/contracts/package.json | 4 |
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" |