Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

javascript-eslint fails with eslint v6.1.0 #1607

Closed
bioand opened this issue Jul 30, 2019 · 2 comments
Closed

javascript-eslint fails with eslint v6.1.0 #1607

bioand opened this issue Jul 30, 2019 · 2 comments

Comments

@bioand
Copy link

bioand commented Jul 30, 2019

The following predicate returns false when running eslint version 6.1.0:

(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" "."))))
    (eq exitcode 0)))

Running the equivalent command from the command line returns non-zero:

$ eslint --print-config .

Oops! Something went wrong! :(

ESLint: 6.1.0.

The '--print-config' CLI option requires a path to a source code file rather than a directory.
See also: https://eslint.org/docs/user-guide/command-line-interface#--print-config

$ echo $?
2

On Ubuntu 18.04.2 LTS.

In Emacs, M-x flycheck-verify-setup

Syntax checkers for buffer server.js in js-mode:

  javascript-eslint (disabled)
    - may enable:  Automatically disabled!
    - executable:  Found at /home/and/.nvm/versions/node/v10.16.0/bin/eslint
    - config file: missing or incorrect

  javascript-jshint (disabled)
    - may enable:         Automatically disabled!
    - executable:         Not found
    - configuration file: Not found

  javascript-jscs (disabled)
    - may enable:         Automatically disabled!
    - executable:         Not found
    - configuration file: Not found

  javascript-standard (disabled)
    - may enable: Automatically disabled!
    - executable: Not found

Flycheck Mode is enabled.  Use C-u C-c ! x to enable disabled
checkers.

--------------------

Flycheck version: 31
Emacs version:    25.2.2
System:           x86_64-pc-linux-gnu
Window system:    x
@cpitclaudel
Copy link
Member

Duplicate of #1600 ?

@bioand
Copy link
Author

bioand commented Jul 31, 2019

Indeed, it is. My apologies.

I have a workaround which I won't PR since I see it's fixed on master (but not yet released).

Thanks ❗

@bioand bioand closed this as completed Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants