Skip to content

Instantly share code, notes, and snippets.

@goldbergyoni
Created December 26, 2018 14:31
Show Gist options
  • Select an option

  • Save goldbergyoni/f503f42357c16d4455f75e02533d9d50 to your computer and use it in GitHub Desktop.

Select an option

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
"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