 )
 (add-hook 'web-mode-hook  'my-web-mode-hook)
 ;; enable typescript-tslint checker
-(flycheck-add-mode 'typescript-tslint 'web-mode)
+(flycheck-add-mode 'javascript-eslint 'web-mode)
 (add-to-list 'auto-mode-alist '("\\.jsx\\'" . rjsx-mode))
 (autoload 'jsx-mode "jsx-mode" "JSX mode" t)
 (add-hook 'prog-mode-hook #'rainbow-delimiters-mode)

(require 'tern)
(require 'tern-auto-complete)
(require 'clean-aindent-mode)
(require 'flycheck-flow)
(require 'rainbow-delimiters)
(require 'helm-ag)
(require 'org)

                      (expand-file-name "node_modules/prettier/bin-prettier.js"
                                        root))))
    (when (and (and eslint (file-executable-p eslint)) (and prettier (file-executable-p prettier)))
      (shell-command (concat prettier " --parser typescript --write " (buffer-file-name) " && " eslint " -o /dev/null --fix " (buffer-file-name))))))

(defun eslint-fix-file-and-revert ()
  (interactive)
  (eslint-fix-file)
  (revert-buffer t t))

(evil-leader/set-key "f" 'eslint-fix-file-and-revert)

(advice-add 'split-window-right :after #'balance-windows)
(advice-add 'split-window-below :after #'balance-windows)
(advice-add 'evil-quit :after #'balance-windows)

(custom-set-variables
 ;; custom-set-variables was added by Custom.
