Enable auto-indent, add JavaScript config to Emacs.