transports: fix jshint warnings and style