add jshint pretest, fix js