I am a spacemacs user, and am trying to set up flycheck to use eslint.
In brief: I open a .js buffer, and try to set flycheck up to use eslint (flycheck-select-checker javascript-eslint) and it says:
javascript-eslint (disabled)
- major mode: `js2-mode' supported
- predicate: t
- executable: Found at /home/elvis/bin/eslint
Flycheck cannot use this syntax checker for this buffer.
So the major mode is supported and the executable is found, yet somehow it cannot use this syntax checker. I don't understand this.
Just to be sure, the eslint executable is foundable via M-: (executable-find "eslint") and also shell-command eslint.
Here is flycheck-verify-setup:
Syntax checkers for buffer hack.js in js2-mode:
javascript-eslint (disabled)
- predicate: t
- executable: Found at /home/elvis/bin/eslint
javascript-jshint (disabled)
- predicate: t
- executable: Found at /usr/bin/jshint
- configuration file: Not found
javascript-gjslint (disabled)
- predicate: t
- executable: Not found
- configuration file: Not found
javascript-jscs (disabled)
- predicate: t
- executable: Not found
- configuration file: Not found
javascript-standard (disabled)
- predicate: t
- executable: Not found
Flycheck Mode is enabled. Use SPC u C-c ! x to enable disabled checkers.
--------------------
Flycheck version: 30snapshot (package: 20160928.649)
Emacs version: 25.1.1
System: x86_64-unknown-linux-gnu
Window system: x
I am using arch linux. Emacs is 25.1.1. flycheck-version says 30snapshot (package: 20160928.649).
Thanks in advance.
Do you have an eslint configuration file? See https://github.com/flycheck/flycheck/issues/1085 and https://github.com/eslint/eslint/issues/7144
(Note to ourselves: we should update C-c ! v to include the result of :enabled, I think)
That was the issue, indeed. Closing because it seems to already be reported. Thank you.
Most helpful comment
Do you have an eslint configuration file? See https://github.com/flycheck/flycheck/issues/1085 and https://github.com/eslint/eslint/issues/7144