Add missing case of purely exporting as module and fix jshint issues