Skip to content

Instantly share code, notes, and snippets.

Ajnasz / pre-commit
Last active Apr 14, 2018 — forked from jhartikainen/commit-msg
ESLint git commit hook
View pre-commit
files=$(git diff --diff-filter ACMR --cached --name-only | grep '\.js$')
for file in $files; do
git show :$file | $(npm bin)/eslint --stdin --stdin-filename $file
View kodfejtok_sample.js
(function(app) {
var blockNodes, complexComputation,
findNodes, hiddenNodes, hide;
complexComputation = function () {
/* do some complex stuff and return a node */
findNodes = function(callback) {
var nodes = [], node;