Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@broofa
broofa / commit-msg
Created October 28, 2016 17:04 — forked from wesbos/commit-msg
ESLint 3.0 Git Pre Commit Hook
#!/bin/bash
files=$(git diff --cached --name-only | grep '\.jsx\?$')
# Prevent ESLint help message if no files matched
if [[ $files = "" ]] ; then
exit 0
fi
failed=0
for file in ${files}; do
apply: (Prototype.Browser.IE ? function(o, a) {
a = a || [];
switch (a.length) {
case 0: return this.call( o);// \ "FUUU...!"
case 1: return this.call( o,a[0]);// \ _
case 2: return this.call( o,a[0],a[1]);// \ \o
case 3: return this.call( o,a[0],a[1],a[2]);// /\_
case 4: return this.call( o,a[0],a[1],a[2],a[3]);// \ /\
case 5: return this.call( o,a[0],a[1],a[2],a[3],a[4]);// > /
case 6: return this.call( o,a[0],a[1],a[2],a[3],a[4],a[5]);// >