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)