base, shell: Fix issues highlighted by jshint

Closes #1479