1.add js2-mode in .emacs.
2.mv the set up code of flycheck into init-flycheck.el