modify js style to pass jshint