       "Hook for `js-mode'."
       (set (make-local-variable 'company-backends)
            '((company-tern company-files)))
-      (flycheck-select-checker 'javascript-eslint)
-      (flycheck-mode)
       (company-mode))
     (add-hook 'js2-mode-hook 'gp/js-mode-hook))
 
   (add-hook 'js2-mode-hook 'tern-mode)
 
-  (add-hook 'flycheck-mode-hook #'gp/setup-local-eslint)
+  ;; (add-hook 'flycheck-mode-hook #'gp/setup-local-eslint)
+  (add-hook 'flycheck-mode-hook #'gp/use-eslint-from-node-modules)
   
   ;; company backend for tern
   ;; http://ternjs.net/doc/manual.html#emacs

  :mode
  ("\\.js$" . js2-mode)
  ("\\.json$" . js2-jsx-mode)
  :config
  (custom-set-variables '(js2-strict-inconsistent-return-warning nil))
  (custom-set-variables '(js2-strict-missing-semi-warning nil))

;; An alternative (hopefully lighter touch) approach to init-webdev.el

;;; Code:
(defvar flycheck-javascript-eslint-executable)
(defvar js2-indent-level)

;; https://github.com/mooz/js2-mode
(use-package js2-mode
