Add tern-mode for js