Check-build - Verify that your NodeJS project follow team conventions, is well written, up to date and secure.
“Each time I start a new project/mvp/poc/module I don't want to create/edit a new grunt/gulp file or whatever hype dev use these days. I want an already packed CLI with good defaults (mine) that I can drop into my continuous build/integration process. Let's build that once and for all.”
– 10/19/2014
npm install check-build -g
cd /path/to/your/project
check-build
# [...] (sub-module output)
echo $?
# 0 if everything went right, 1 otherwise.- JSHint Static analysis tool for JavaScript (using JSHint stylish). If
.jshintrcis not present in project root, check-build will use this .jshintrc.
[To be implemented]: FixMyJS Automatically fix silly lint errors.
- JSCS Check the code style of your code. If
.jscsrcis not present in project root, check-build will use this .jscsrc.
- David Check that your project dependencies are up to date.
- Nsp Check your project dependencies for security issues.
- Leverage simplicity over performance.
check-buildwill be run automatically by a build bot. I #%£€)° don't care about performance, I want code quality and ease of use. - Don't reinvent the wheel, leverage each module own configuration file. E.g.
.jshintrc. - Even if the underneath module is not capable of handling multiple files, abstract it.
- Use
multimatcheverywhere. .checkbuildis there to configure each module (in case they don't use dot files for configuration), checkbuild will forward these parameters to each module implementation.
Put a .checkbuild file (example) in your project root directory.
{
"checkbuild": {
"enable": ["jshint", "jscs", "jsinspect", "nsp", "david"],
// don't exit immediately if one of the tools reports an error (default true)
"continueOnError": true,
// don't exit(1) even if we had some failures (default false)
"allowFailures": false
},
"david": {
"warn": {
"E404": true
}
// ... and so on.
},
"jshint": {
"args": ["src/**/*.js"]
// ... and so on.
},
"jscs": {
"args": ["lib/**.js"]
// ... and so on.
},
"jsinspect": {
"args": ["*.js"],
"diff": true
// ... and so on.
},
"buddyjs": {
"args": ["*.js"],
"ignore": [0, 1, 200]
// ... and so on.
},
"nsp": {}
}A (NodeJS) project can be automatically analyzed in many dimension like code-consistency, d-r-y-ness and security. Check-build's final goal is to take the human out of the loop.



