Created
December 26, 2018 14:31
-
-
Save goldbergyoni/f503f42357c16d4455f75e02533d9d50 to your computer and use it in GitHub Desktop.
Doing It Right Example: npm scripts that perform code quality inspection, all are run in parallel on demand or when a developer is trying to push new code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "scripts": { | |
| "inspect:sanity-testing": "mocha **/**--test.js --grep \"sanity\"", | |
| "inspect:lint": "eslint .", | |
| "inspect:vulnerabilities": "npm audit", | |
| "inspect:license": "license-checker --failOn GPLv2", | |
| "inspect:complexity": "plato .", | |
| "inspect:all": "concurrently -c \"bgBlue.bold,bgMagenta.bold,yellow\" \"npm:inspect:quick-testing\" \"npm:inspect:lint\" \"npm:inspect:vulnerabilities\" \"npm:inspect:license\"" | |
| }, | |
| "husky": { | |
| "hooks": { | |
| "precommit": "npm run inspect:all", | |
| "prepush": "npm run inspect:all" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment