1 ;;; -*- lexical-binding: t -*-
5 (global-flycheck-mode 1)
7 (setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc))
9 (setq flycheck-emacs-lisp-load-path 'inherit)
11 (add-hook 'flycheck-mode-hook #'my/use-eslint-from-node-modules)
13 (setq flycheck-indication-mode 'right-fringe)
15 (define-fringe-bitmap 'flycheck-fringe-bitmap-double-arrow
34 (defun my/use-eslint-from-node-modules ()
35 (let* ((root (locate-dominating-file
36 (or (buffer-file-name) default-directory)
39 (expand-file-name "node_modules/.bin/eslint" root))))
40 (when (and eslint (file-executable-p eslint))
41 (setq-local flycheck-javascript-eslint-executable eslint))))