{"id":13606664,"url":"https://github.com/FGRibreau/check-build","last_synced_at":"2025-04-12T08:31:52.187Z","repository":{"id":22090634,"uuid":"25420343","full_name":"FGRibreau/check-build","owner":"FGRibreau","description":":dart: Check-build - Verifies that your NodeJS project follows team conventions, is well written, up to date and secure.","archived":false,"fork":false,"pushed_at":"2020-07-09T10:05:17.000Z","size":2356,"stargazers_count":687,"open_issues_count":28,"forks_count":30,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-10-29T12:12:42.372Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://blog.fgribreau.com/2014/10/check-build-verify-that-your-nodejs.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FGRibreau.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-19T07:10:56.000Z","updated_at":"2024-04-27T13:57:53.000Z","dependencies_parsed_at":"2022-08-19T06:11:09.974Z","dependency_job_id":null,"html_url":"https://github.com/FGRibreau/check-build","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FGRibreau%2Fcheck-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FGRibreau%2Fcheck-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FGRibreau%2Fcheck-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FGRibreau%2Fcheck-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FGRibreau","download_url":"https://codeload.github.com/FGRibreau/check-build/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248539977,"owners_count":21121267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T19:01:11.287Z","updated_at":"2025-04-12T08:31:47.180Z","avatar_url":"https://github.com/FGRibreau.png","language":"JavaScript","funding_links":["https://paypal.me/fgribreau"],"categories":["JavaScript","📦 Legacy \u0026 Inactive Projects"],"sub_categories":[],"readme":"[![Deps](https://img.shields.io/david/FGRibreau/check-build.svg)](https://david-dm.org/FGRibreau/check-build) [![Version](https://img.shields.io/npm/v/check-build.svg)](http://badge.fury.io/js/check-build) [![Downloads](http://img.shields.io/npm/dm/check-build.svg)](https://www.npmjs.com/package/check-build) [![](https://images.microbadger.com/badges/image/fgribreau/check-build.svg)](https://microbadger.com/images/fgribreau/check-build)\n\n[![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/francois-guillaume-ribreau?utm_source=github\u0026utm_medium=button\u0026utm_term=francois-guillaume-ribreau\u0026utm_campaign=github)  [![available-for-advisory](https://img.shields.io/badge/available%20for%20consulting%20advisory-yes-ff69b4.svg?)](http://bit.ly/2c7uFJq) ![extra](https://img.shields.io/badge/actively%20maintained-yes-ff69b4.svg) [![Twitter Follow](https://img.shields.io/twitter/follow/fgribreau.svg?style=flat)](https://twitter.com/FGRibreau) [![Slack](https://img.shields.io/badge/Slack-Join%20our%20tech%20community-17202A?logo=slack)](https://join.slack.com/t/fgribreau/shared_invite/zt-edpjwt2t-Zh39mDUMNQ0QOr9qOj~jrg)\n\n![NPM](https://nodei.co/npm/check-build.png?downloadRank=true) ![NPM](https://nodei.co/npm-dl/check-build.png?months=3\u0026height=2)\n\n**Check-build** - Verify that your NodeJS project follow team conventions, is well written, up to date and *secure*.\n\n\n\u003e “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.\n\u003e I want an already packed CLI with good defaults (mine) that I can drop into my continuous build/integration process.\n\u003e Let's build that once and for all.”\n\u003e\n\u003e – 10/19/2014\n\n\u003cp align=\"center\"\u003e\n\u003ca target=\"_blank\" href=\"http://fr.slideshare.net/FGRibreau/continous-integration-of-js-projects-checkbuild-philosophy\"\u003e\u003cimg style=\"width:100%\" src=\"https://cloud.githubusercontent.com/assets/138050/6199101/a16874ae-b42e-11e4-94fd-bd739d3ba4f4.jpg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# Usage\n\n```shell\nnpm install check-build -g\ncd /path/to/your/project\ncheck-build\n# [...] (sub-module output)\necho $?\n# 0 if everything went right, 1 otherwise.\n```\n\n# What's inside\n\n### Code error and potential problem detection\n\n- [JSHint](https://github.com/jshint/jshint) Static analysis tool for JavaScript (using [JSHint stylish](https://github.com/sindresorhus/jshint-stylish)). If `.jshintrc` is not present in project root, check-build will use this [.jshintrc](./defaults/.jshintrc).\n- [ESLint](http://eslint.org/) The pluggable linting utility for JavaScript and JSX, check-build will use a [.eslintrc](./defaults/.eslintrc) file for ESLint configuration.\n- [JSXHint](https://github.com/STRML/JSXHint) **JSXHint is DEPRECATED in favor of ESLint** Static analysis tool for JavaScript and JSX. If `.jshintrc` is not present in project root, check-build will use this [.jshintrc](./defaults/.jshintrc).\n\n### Code style checking\n\n- [JSCS](https://github.com/jscs-dev/node-jscs) Check the code style of your code. If `.jscsrc` is not present in project root, check-build will use this [.jscsrc](./defaults/.jscsrc).\n\n### Code quality\n- [Plato](https://github.com/es-analysis/plato) Detect structural complexity in your code, per files.\n\n### D.R.Y\n\n- [JSInspect](https://www.npmjs.org/package/jsinspect) Detect structural similarities in your code.\n- [buddy.js](https://github.com/danielstjules/buddy.js) Detect magic number in your code.\n\n### Freshness\n\n- [David](https://github.com/alanshaw/david) Check that your project dependencies are up to date.\n\n### Security\n\n- [Nsp](https://github.com/nodesecurity/nsp) Check your project dependencies for security issues.\n\n*Note: check-build uses a temporary fork of nsp adding a `--subdeb-warn-only` argument, [see why here](https://github.com/nodesecurity/nsp/pull/58)*\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"./docs/mindblown2.gif\"/\u003e\n\u003c/p\u003e\n\n# Philosophy\n\n- Leverage simplicity over performance. `check-build` will be run automatically by a build bot. I #%£€)° don't care about performance, I want code quality and ease of use.\n- Don't reinvent the wheel, leverage each module own configuration file. E.g. `.jshintrc`.\n- Even if the underneath module is not capable of handling multiple files, abstract it.\n- Use `multimatch` everywhere.\n- `.checkbuild` is there to configure each module (in case they don't use dot files for configuration), checkbuild will forward these parameters to each module implementation.\n\n# Checkbuild configuration\n\nPut a `.checkbuild` file ([example](./defaults/.checkbuild)) in your project root directory.\n\n```javascript\n{\n  // Extends the current checkbuild file with others (optionnal)\n  \"extends\": [\"./.checkbuildrc_base\"],\n  // Download some distant files and save them into check-build command current directory\n  // Usefull when used with extends (optionnal)\n  \"urls\": [\"https://raw.githubusercontent.com/FGRibreau/javascript/master/.checkbuildrc_base\"],\n  \"checkbuild\": {\n    \"enable\": [\"jshint\", \"eslint\", \"jscs\", \"jsinspect\", \"plato\", \"nsp\", \"david\"],\n    // don't exit immediately if one of the tools reports an error (default true)\n    \"continueOnError\": true,\n    // don't exit(1) even if we had some failures (default false)\n    \"allowFailures\": false\n  },\n\n  \"david\": {\n    \"warn\": {\n      \"E404\": true\n    },\n    \"ignore\": [\"socket.io\"] // don't check socket.io package with david\n    // ... and so on.\n  },\n\n  \"jshint\": {\n    \"args\": [\"src/**/*.js\"]\n    // instead of putting a .jshintrc inside each of your project with check-build\n    // you can specify an URL.\n    // That URL will be downloaded each time check-build is run\n    // and its content will be saved inside check-build command current directory.\n    // for instance the above .checkbuild jshint configuration:\n    // \"url\":\"https://raw.githubusercontent.com/FGRibreau/javascript/master/.jshintrc_base\"\n    // will download the jshintrc_base (the common jshint convention for your organization) inside your project.\n    // This .jshintrc_base should be ignored from git and NOT commited.\n    // Then, create and commit a .jshintrc that contains at least:\n    // {\n    //  \"extends\": \"./.jshintrc_base\",\n    //  ...\n    // }\n    // inside this .jshintrc file you will be able to put project-specific jshint configuration.\n  },\n\n \"eslint\": {\n    \"args\": [\"src/**/*.js\", \"src/**/*.jsx\"],\n    // instead of putting a .eslintrc inside each of your project with check-build\n    // you can specify an URL.\n    // That URL will be downloaded each time check-build is run\n    // and its content will be saved inside check-build command current directory.\n    // for instance the above .checkbuild jshint configuration:\n    // \"url\":\"https://raw.githubusercontent.com/FGRibreau/javascript/master/.eslintrc_base\"\n    // will download the eslintrc_base (the common eslint convention for your organization) inside your project.\n    // This .eslintrc_base should be ignored from git and NOT commited.\n    // Then, create and commit a .eslintrc that contains at least:\n    // {\n    //  \"extends\": [\"./.eslintrc_base\"],\n    //  ...\n    // }\n    // inside this .eslintrc file you will be able to put project-specific ESLint configuration.\n    // ... and so on.\n  },\n\n  \"jscs\": {\n    \"args\": [\"lib/**.js\"]\n    // ... and so on.\n    // instead of putting a .jscrc inside each of your project with check-build\n    // you can specify an URL.\n    // That URL will be downloaded each time check-build is run\n    // and its content will be saved inside check-build command current directory\n    // \"url\":\"https://raw.githubusercontent.com/FGRibreau/javascript/master/.jscsrc\"\n  },\n\n  \"jsinspect\": {\n    \"args\": [\"*.js\"],\n    \"diff\": true\n    // ... and so on.\n  },\n\n  \"buddyjs\": {\n    \"args\": [\"*.js\"],\n    \"ignore\": [0, 1, 200]\n    // ... and so on.\n  },\n\n  \"plato\": {\n    \"args\": [\"*.js\"],\n    // define your project minimum average maintainability level\n    \"maintainability\": 75.00\n  },\n\n  \"nsp\": {\n    \"args\": []\n  },\n\n  \"david\": {\n    \"dev\": false,\n    // whether to check devDependencies or not (default false)\n    \"stable\": true,\n    // whether to check dependencies or not (default true)\n    \"ignore\": []\n    // put ignored dependencies here (both devDependencies and dependencies)\n  }\n}\n\n```\n*Note: the `url` attribute presented for eslint is available for each extension*\n\n\u003cp align=\"center\"\u003e\n\u003cimg style=\"width:100%\" src=\"./docs/building-house.gif\"/\u003e\n\u003c/p\u003e\n\n# Final goal\n\nA (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.\n\n## Donate\n\nI maintain this project in my free time, if it helped you please support my work [via paypal](https://paypal.me/fgribreau) or [Bitcoins](https://www.coinbase.com/fgribreau), thanks a lot!\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFGRibreau%2Fcheck-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFGRibreau%2Fcheck-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFGRibreau%2Fcheck-build/lists"}