From c857692fe54c5bbc22334890121745457a12d30e Mon Sep 17 00:00:00 2001 From: Vladyslav M Date: Mon, 24 Jun 2019 00:32:12 +0300 Subject: [PATCH] Fix `flycheck-eslint-config-exists-p` for ESLint 6 See https://github.com/eslint/eslint/pull/11885 --- flycheck.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/flycheck.el b/flycheck.el index af101fa8d..fd232deea 100644 --- a/flycheck.el +++ b/flycheck.el @@ -8621,8 +8621,10 @@ for more information about the custom directories." (defun flycheck-eslint-config-exists-p () "Whether there is a valid eslint config for the current buffer." (let* ((executable (flycheck-find-checker-executable 'javascript-eslint)) - (exitcode (and executable (call-process executable nil nil nil - "--print-config" ".")))) + (exitcode (and executable + (call-process executable nil nil nil + "--print-config" (or buffer-file-name + "index.js"))))) (eq exitcode 0))) (defun flycheck-parse-eslint (output checker buffer)