 (add-hook 'typescript-mode-hook 'flycheck-mode)
 (add-hook 'typescript-mode-hook
           (lambda ()
-            (add-hook 'after-save-hook #'tslint-fix-file-and-revert nil 'make-it-local)))
+            (add-hook 'after-save-hook #'eslint-fix-file-and-revert nil 'make-it-local)))
 
 (add-hook 'web-mode-hook
           (lambda ()
-            (add-hook 'after-save-hook #'tslint-fix-file-and-revert nil 'make-it-local)))
-
-(defun my/use-tslint-from-node-modules ()
-  (let* ((root (locate-dominating-file
-                (or (buffer-file-name) default-directory)
-                "node_modules"))
-         (tslint (and root
-                      (expand-file-name "node_modules/tslint/bin/tslint.js"
-                                        root))))
-    (when (and tslint (file-executable-p tslint))
-      (setq-local flycheck-typescript-tslint-executable tslint))))
-
-(add-hook 'flycheck-mode-hook #'my/use-tslint-from-node-modules)
+            (add-hook 'after-save-hook #'eslint-fix-file-and-revert nil 'make-it-local)))
 
 (with-eval-after-load 'flycheck
-    (flycheck-add-mode 'javascript-flow 'rjsx-mode)
-    (flycheck-add-next-checker 'javascript-flow 'javascript-eslint))
+    (flycheck-add-mode 'javascript-eslint 'web-mode))
+
+(with-eval-after-load 'flycheck
+    (flycheck-add-mode 'javascript-eslint 'typescript-mode))
+
+(with-eval-after-load 'flycheck
+    (flycheck-add-mode 'javascript-eslint 'tide-mode))
+
 (set-face-attribute 'flycheck-warning nil
                     :foreground "yellow"
                     :background "red")

  ;; company is an optional dependency. You have to
  ;; install it separately via package-install
  ;; `M-x package-install [ret] company`
  (company-mode +1))

;; aligns annotation to the right hand side
(setq company-tooltip-align-annotations t)

(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))

(setq evil-want-C-u-scroll t)

