I have project with eslint already setup and I would like to use it in Spacemacs. Unfortunately Spacemacs seems to ignore .eslintrc.js file in project root.
I'm on Windows 10 ...
Can anyone help?
Spacemacs (and flycheck, the autocompletion plugin that interfaces with eslint) don't look for eslint configs, they delegate that to eslint itself. If you're getting this issue it means eslint itself is erroring out when it tries to load your project config.
Run eslint --print-config .
from your project directory and resolve all errors it prints out, and that should fix it.
I'm running a mac setup, this is what worked for me:
assuming you've installed eslint, you can enable syntax checking in your ~/.spacemacs
file
Begin by typing SPC f e d
and uncommenting syntax-checking
;; spell-checking
syntax-checking
SPC f e R
.eslintrc
in its rootSPC e v
From here you can confirm that javascript-eslint is enabled and that an .eslintrc
has been detected for your project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With