• Stars
    star
    686
  • Rank 63,563 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 9 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🎯 Check-build - Verifies that your NodeJS project follows team conventions, is well written, up to date and secure.

Deps Version Downloads

Get help on Codementor available-for-advisory extra Twitter Follow Slack

NPM NPM

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

Usage

npm install check-build -g
cd /path/to/your/project
check-build
# [...] (sub-module output)
echo $?
# 0 if everything went right, 1 otherwise.

What's inside

Code error and potential problem detection

  • JSHint Static analysis tool for JavaScript (using JSHint stylish). If .jshintrc is not present in project root, check-build will use this .jshintrc.
  • ESLint The pluggable linting utility for JavaScript and JSX, check-build will use a .eslintrc file for ESLint configuration.
  • 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.

Code style checking

  • JSCS Check the code style of your code. If .jscsrc is not present in project root, check-build will use this .jscsrc.

Code quality

  • Plato Detect structural complexity in your code, per files.

D.R.Y

  • JSInspect Detect structural similarities in your code.
  • buddy.js Detect magic number in your code.

Freshness

  • David Check that your project dependencies are up to date.

Security

  • Nsp Check your project dependencies for security issues.

Note: check-build uses a temporary fork of nsp adding a --subdeb-warn-only argument, see why here

Philosophy

  • 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.
  • 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 multimatch everywhere.
  • .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.

Checkbuild configuration

Put a .checkbuild file (example) in your project root directory.

{
  // Extends the current checkbuild file with others (optionnal)
  "extends": ["./.checkbuildrc_base"],
  // Download some distant files and save them into check-build command current directory
  // Usefull when used with extends (optionnal)
  "urls": ["https://raw.githubusercontent.com/FGRibreau/javascript/master/.checkbuildrc_base"],
  "checkbuild": {
    "enable": ["jshint", "eslint", "jscs", "jsinspect", "plato", "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
    },
    "ignore": ["socket.io"] // don't check socket.io package with david
    // ... and so on.
  },

  "jshint": {
    "args": ["src/**/*.js"]
    // instead of putting a .jshintrc inside each of your project with check-build
    // you can specify an URL.
    // That URL will be downloaded each time check-build is run
    // and its content will be saved inside check-build command current directory.
    // for instance the above .checkbuild jshint configuration:
    // "url":"https://raw.githubusercontent.com/FGRibreau/javascript/master/.jshintrc_base"
    // will download the jshintrc_base (the common jshint convention for your organization) inside your project.
    // This .jshintrc_base should be ignored from git and NOT commited.
    // Then, create and commit a .jshintrc that contains at least:
    // {
    //  "extends": "./.jshintrc_base",
    //  ...
    // }
    // inside this .jshintrc file you will be able to put project-specific jshint configuration.
  },

 "eslint": {
    "args": ["src/**/*.js", "src/**/*.jsx"],
    // instead of putting a .eslintrc inside each of your project with check-build
    // you can specify an URL.
    // That URL will be downloaded each time check-build is run
    // and its content will be saved inside check-build command current directory.
    // for instance the above .checkbuild jshint configuration:
    // "url":"https://raw.githubusercontent.com/FGRibreau/javascript/master/.eslintrc_base"
    // will download the eslintrc_base (the common eslint convention for your organization) inside your project.
    // This .eslintrc_base should be ignored from git and NOT commited.
    // Then, create and commit a .eslintrc that contains at least:
    // {
    //  "extends": ["./.eslintrc_base"],
    //  ...
    // }
    // inside this .eslintrc file you will be able to put project-specific ESLint configuration.
    // ... and so on.
  },

  "jscs": {
    "args": ["lib/**.js"]
    // ... and so on.
    // instead of putting a .jscrc inside each of your project with check-build
    // you can specify an URL.
    // That URL will be downloaded each time check-build is run
    // and its content will be saved inside check-build command current directory
    // "url":"https://raw.githubusercontent.com/FGRibreau/javascript/master/.jscsrc"
  },

  "jsinspect": {
    "args": ["*.js"],
    "diff": true
    // ... and so on.
  },

  "buddyjs": {
    "args": ["*.js"],
    "ignore": [0, 1, 200]
    // ... and so on.
  },

  "plato": {
    "args": ["*.js"],
    // define your project minimum average maintainability level
    "maintainability": 75.00
  },

  "nsp": {
    "args": []
  },

  "david": {
    "dev": false,
    // whether to check devDependencies or not (default false)
    "stable": true,
    // whether to check dependencies or not (default true)
    "ignore": []
    // put ignored dependencies here (both devDependencies and dependencies)
  }
}

Note: the url attribute presented for eslint is available for each extension

Final goal

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.

Donate

I maintain this project in my free time, if it helped you please support my work via paypal or Bitcoins, thanks a lot!

More Repositories

1

mailchecker

📫 Cross-language temporary (disposable/throwaway) email detection library. Covers 55 734+ fake email providers.
PHP
1,486
star
2

match-when

🐚 Pattern matching for modern JavaScript
JavaScript
528
star
3

spinners

🛎 60+ Elegant terminal spinners for Rust
Rust
462
star
4

jq.node

jq.node - like jq but WAY MORE powerful (300+ helpers 🔥 & 1.45M modules 😱)
JavaScript
418
star
5

dot-clipboard

👝 dot-clipboard monitors your clipboard and runs scripts based on its content
JavaScript
416
star
6

node-language-detect

🇫🇷 NodeJS language detection library using n-gram
JavaScript
375
star
7

node-request-retry

💂‍♂️ Wrap NodeJS request module to retry http requests in case of errors
JavaScript
346
star
8

gron

gron - Make JSON greppable!
JavaScript
294
star
9

forever-webui

[unmaintained] 📡 A simple web UI for efficient NodeJS processes administration
JavaScript
293
star
10

ui-predicate

Finally a Predicate/Rule Editor UI component for the Web 🚀
JavaScript
152
star
11

node-unidecode

📃 ASCII transliterations of Unicode text
JavaScript
130
star
12

import-tweets-to-mastodon

How to import tweets to mastodon (e.g. https://framapiaf.org )
JavaScript
87
star
13

spm

spm • Scala Package Manager - it's based on sbt but npm-like :trollface:
Shell
79
star
14

influxdb-cli

SQL CLI for InfluxDB
JavaScript
70
star
15

common-env

🔑 The only configuration library you will ever need
JavaScript
70
star
16

sql-convention

👌 The only SQL conventions you will ever need
57
star
17

google-spreadsheet-cli

📊 CLI for reading and writing data into Google Spreadsheet
JavaScript
52
star
18

node-truncate

🐙 Truncate text and keeps urls safe.
JavaScript
52
star
19

network-config

Network configuration for NodeJS
JavaScript
50
star
20

spotify-downloader

A proof-of-concept that transforms a Spotify playlist to a direct-download list
JavaScript
50
star
21

stripe-schema

Complete Stripe (🥰) schema (as of 2019-10-09): for learning and inspiration.
Shell
34
star
22

xobject-observe

🔬 A cross-browser object property observer using ES6 proxy with a fallback on dirty-checking.
JavaScript
33
star
23

if-exp

🎩 Conditional expressions for JavaScript
JavaScript
32
star
24

postgresql-to-amqp

PostgreSQL to AMQP, forward PostgreSQL notifications to an AMQP queue.
Rust
30
star
25

node-amqp-tool

AMQP-tool - Import & export data from/to an AMQP/RabbitMQ broker
JavaScript
26
star
26

kubectx-rs

Switch between Kubernetes contexts 🏎
Shell
25
star
27

pound

Pound - High-level asset Manager for Node.js/Express
JavaScript
25
star
28

alfred-crates

Workflow for searching Rust crates from Alfred
Rust
21
star
29

jsobjectdiff

Ensure that two JavaScript files containing objects have the same keys and display differences
JavaScript
21
star
30

node-children

Concurrent tasks computation among NodeJS child processes (vertical scaling)
JavaScript
20
star
31

npm-interactive-scripts

⚡️Fast Interactive CLI for npm scripts
JavaScript
18
star
32

stripe-update-card

💳 Expose a page that let your customers update their payment information on Stripe.
Rust
18
star
33

redis-tool

Redis-tool - Little helpers for Redis
JavaScript
17
star
34

json-schema-documentation

JSON-Schema documentor (generator, cli, themes)
JavaScript
16
star
35

Growl-Chrome-Notification

Notifications Growl pour Google Chrome :: Proof of concept :: HTML5 Web Notification API + WebSocket + NodeJS
JavaScript
16
star
36

mixpanel_export_people

Export Mixpanel people properties to an Excel Compatible CSV
JavaScript
16
star
37

node-tolerant-url-parser

Overly tolerant url parser specialized in parsing protocol, auth (even invalid ones), host and port url parts.
JavaScript
15
star
38

droplr-backup

How to backup your droplr account
JavaScript
15
star
39

stream-valve

🔐 Ensure that a stream disconnects if it goes over `maxBytes` `perSeconds`
JavaScript
14
star
40

filesync

👥 Unidirectional 1-N file syncing with history and local merging
JavaScript
14
star
41

redistree

RedisTree - load & save Trees to Redis using sets
JavaScript
13
star
42

node-redis-info

Redis info string parser for NodeJS
JavaScript
13
star
43

request-api

NodeJS request library as HTTP API
JavaScript
13
star
44

amqp-replay

📹 Replay messages from (RabbitMQ) AMQP dead-letter queue
JavaScript
12
star
45

this-is-your-life

This if your life
JavaScript
12
star
46

rss-to-amp-stories

RSS to AMP Stories ⚡️
HTML
12
star
47

latenize

NPM/NodeJS port of Semplice latenize
JavaScript
12
star
48

smtp-to-sendgrid-gateway

Forward emails from SMTP requests to the Sendgrid API. Useful when the cloud provider does not allow outbound connections on ports 25, 465, 587.
JavaScript
11
star
49

my-first-nodejs-service

🐾 Workshop my first nodejs service
JavaScript
11
star
50

node-transacemail

Transactional Email & Templated Email for NodeJS done right
JavaScript
11
star
51

stargazerz

Stargazerz - export repository 🌟 stargazers 🌟 profile as JSON
JavaScript
9
star
52

kubectx

Fastest switch between #Kubernetes contexts 🏎
JavaScript
9
star
53

mixpanel-cli

🎩 mixpanel-cli - A complete CLI to query Mixpanel API
JavaScript
9
star
54

stripe-integration

Easiest Stripe Integration (ever)
Rust
9
star
55

rss-to-lametric

Your favorite RSS feed directly from your LaMetric 🎩
Rust
8
star
56

tumblr-analysis

Extract every tumblr posts as JSON from a blog and analyze them.
JavaScript
8
star
57

node-amqp-dsl

AMQP-DSL is a fluent interface for AMQP (RabbitMQ,...) on NodeJS
CoffeeScript
8
star
58

123PeopleRemover-proxy

Proxy pour 123PeoplerRemover à installer sur votre serveur
PHP
8
star
59

jQuery-plugin-attributeObserver

jQuery plugin for observing html element's property changes
JavaScript
8
star
60

node-nice-console

Patch NodeJS console methods in order to add timestamp information
JavaScript
8
star
61

gcloud

Google Cloud API client for Rust
Rust
8
star
62

jQuery-plugin-fireEvent

jQuery FireEvent - Plugin for firing real DOM events
JavaScript
8
star
63

node-ast-inlining

Node Ast Inlining is a small (~200 LOC) library that inline and expand function call
JavaScript
7
star
64

jQuery-plugin-getPath

jQuert getPath - Find a (possible) jQuery selector of an HTML element.
JavaScript
7
star
65

preg_replace---preg_replace_callback-in-javascript

PHP functions preg_replace & preg_replace_callback javascript equivalent
JavaScript
7
star
66

node-x509-certificate

Retrieve the public TLS certificate in x509 format from a distant host
JavaScript
7
star
67

lool

:trollface: Infinitely recursive self-installing useless package.
6
star
68

querystring

🦄 Querystring for Rust
Rust
5
star
69

twitterremover

How I "hijacked" Topsy private search api to remove my first 5000+ tweets
JavaScript
5
star
70

scaleway-api-client

☁ Scaleway NodeJS API Client 🚀
JavaScript
5
star
71

self-worth

See jeffreybaird/self-worth
Ruby
5
star
72

jscs2doc

🎊 Convert .jscsrc (javascript code-style configuration) to a human readable format
JavaScript
5
star
73

rk

Original idea by @stockholmux in Dancing around strings in Node.js and Redis
JavaScript
5
star
74

json-combine

Generate every possible combination of values
JavaScript
4
star
75

backbone-cappedcollection

Capped Collections for BackboneJS
JavaScript
4
star
76

Trickle-clone

A Quick & Dirty trickle clone
JavaScript
4
star
77

valid-json-template

Use a (valid) JSON as a template that produce another valid JSON as a result
JavaScript
4
star
78

chrome-freeze-tab-title

Freeze Tab Title & Favicon Chrome Extension - Increase productivity & Reduce procrastination 🌟🌟
JavaScript
4
star
79

terraform-workspace-switcher

Fastest switch between Terraform workspaces
Shell
4
star
80

clipboard-watcher

Listen to clipboard change (OSX only)
JavaScript
4
star
81

bmw_oss_dvd

♣️ BMW Open Source Software (OSS) DVD - I received for my BMW X3
3
star
82

big-brother

Web2Day Hackathon 2011
JavaScript
3
star
83

JSCSSP

JSCSSP without DOM pollution
JavaScript
3
star
84

join-events

▶️ Join events stream compatible with event emitter
JavaScript
3
star
85

app-demonstrator

Proof of Concept - (iPhone & co) Application demonstrator
JavaScript
3
star
86

postgrest-patch-request-trigger

How PostgreSQL triggers works when called with a PostgREST PATCH HTTP request
PLpgSQL
3
star
87

hostname-is-private

:squirrel: Check whether or not an hostname refers to a private IP
JavaScript
3
star
88

url-is-private

Check whether or not an url refer to a private IP
JavaScript
3
star
89

maintainers-convention

💂‍♂️ Ensure a MAINTAINERS file exist inside every repository of a Github Organisation
JavaScript
3
star
90

node-asynccallguard

Make all calls to a function queued and asynchronously guarded
JavaScript
3
star
91

ai-rom

TP cours d'IA
C
2
star
92

cancelable

Cancelable JavaScript functions
JavaScript
2
star
93

request-when

Request + WhenJS
JavaScript
2
star
94

elasticsearch-exceptions

Parse Elasticsearch exception responses and transform them into JavaScript Errors
JavaScript
2
star
95

ai-GeneticAlgorithm

Genetical Algorithm w/ Chessboard
C
2
star
96

sync-to-gitlab

👨‍🚒 Sync/backup entire directories to personal Gitlab projects
Shell
2
star
97

stretchtext

StretchText
JavaScript
2
star
98

iPhone-Particles

Simple iPhone Particles App
JavaScript
2
star
99

docker-jenkins-slave

💪 Run a Jenkins slave in docker AND access to docker cli from jobs
2
star
100

node-transacemail-mandrill

Mandrill mailProvider for node-transacemail
JavaScript
2
star