瀏覽代碼

feat: add solium linting to travis, npm script

Matt Condon 7 年之前
父節點
當前提交
e0f3fea97f
共有 4 個文件被更改,包括 933 次插入16 次删除
  1. 1 1
      .github/PULL_REQUEST_TEMPLATE.md
  2. 1 0
      .travis.yml
  3. 926 15
      package-lock.json
  4. 5 0
      package.json

+ 1 - 1
.github/PULL_REQUEST_TEMPLATE.md

@@ -3,7 +3,7 @@
 - [ ] 📘 I've reviewed the [OpenZeppelin Contributor Guidelines](/docs/CONTRIBUTING.md)
 - [ ] ✅ I've added tests where applicable to test my new functionality.
 - [ ] 📖 I've made sure that my contracts are well-documented.
-- [ ] 🎨 I've run the JavaScript linter (`npm run lint:fix`) and fixed all issues.
+- [ ] 🎨 I've run the JS/Solidity linters (`npm run lint:all:fix`) and fixed any issues.
 
 <!-- **Does this close any open issues?** If so, list them here. -->
 

+ 1 - 0
.travis.yml

@@ -18,6 +18,7 @@ before_script:
   - truffle version
 script:
   - npm run lint
+  - npm run lint:sol
   - npm run test
 notifications:
   slack:

File diff suppressed because it is too large
+ 926 - 15
package-lock.json


+ 5 - 0
package.json

@@ -6,6 +6,10 @@
     "test": "scripts/test.sh",
     "lint": "eslint .",
     "lint:fix": "eslint . --fix",
+    "lint:sol": "solium -d .",
+    "lint:sol:fix": "solium -d . --fix",
+    "lint:all": "npm run lint && npm run lint:sol",
+    "lint:all:fix": "npm run lint:fix && npm run lint:sol:fix",
     "console": "truffle console",
     "coverage": "scripts/coverage.sh"
   },
@@ -47,6 +51,7 @@
     "ethereumjs-util": "^5.1.2",
     "mocha-lcov-reporter": "^1.3.0",
     "solidity-coverage": "^0.4.3",
+    "solium": "^1.1.2",
     "truffle": "^4.0.0",
     "truffle-hdwallet-provider": "0.0.3"
   },

Some files were not shown because too many files changed in this diff