make adapter.js pass jshint tests