 
 (setq-default js2-global-externs '("require"))
 
-(defun gp-js2-mode-hook ()
+(defun gp/js2-mode-hook ()
   "Setup js2-mode as I like it."
   (tern-mode)
   (subword-mode)
   ;;(rainbow-identifiers-mode)
   (origami-mode)
   (setq indent-tabs-mode nil)
-  (gp-setup-webdev-indent 2)
+  (gp/setup-webdev-indent 2)
   (setq js2-bounce-indent-p t)
   (setq js2-highlight-external-variables nil)
   (setq js2-mode-show-parse-errors nil)
+  (add-hook 'flycheck-mode-hook #'gp/use-eslint-from-node-modules)
   (flycheck-add-mode 'javascript-eslint 'js2-mode)
-  (flycheck-select-checker 'javascript-eslint)
   (setq-default flycheck-disabled-checkers
                 (append flycheck-disabled-checkers '(json-jsonlist)))
   (setq-default flycheck-disabled-checkers

    (delete-process "Tern"))
  )

(defun gp-setup-webdev-indent (n)
  "Set indentation for webdev related modes to N spaces."
  (setq coffee-tab-width n) ; coffeescript
  (setq javascript-indent-level n) ; javascript-mode

  )

;; adjust indents for web-mode to 2 spaces
(defun gp/web-mode-hook ()
  "Hooks for Web mode."

  ;; enable other modes that we need
