<commit_before>#!/usr/bin/env bash

function lint
{
	output=$(find $1 -name "*.js" -print0 | xargs -0 ./node_modules/.bin/jslint --plusplus --white --var --goodparts --node | grep -v "is OK." | grep '[^[:space:]]')
	exit=$?
	
	echo "$output" | grep "[[:space:]]"
	
	if [ $exit -eq 0 ]
	then
		exit 1
	fi
}

lint lib
lint test
<commit_msg>Makes jslint to STFU about __dirname which is part of the node globals anyway.<commit_after>#!/usr/bin/env bash

function lint
{
	output=$(find $1 -name "*.js" -print0 | xargs -0 ./node_modules/.bin/jslint --nomen --plusplus --white --var --goodparts --node | grep -v "is OK." | grep '[^[:space:]]')
	exit=$?
	
	echo "$output" | grep "[[:space:]]"
	
	if [ $exit -eq 0 ]
	then
		exit 1
	fi
}

lint lib
lint test
{'fraction_non_alphanumeric': 0.196524064171123, 'fraction_numerical': 0.013368983957219251, 'mean_word_length': 2.9214659685863875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5849354', 'n_tokens_mistral': 311, 'n_tokens_neox': 282, 'n_words': 94}