3 ms·
Why would one want to run eslint through an LSP? Using flymake it call the CLI works just fine and is more direct.
by PuercoPop 4y ago
Why would one want to run eslint through an LSP? Using flymake it call the CLI works just fine and is more direct.
- jrockway 4y agoWhy wouldn't you want the lint error to be highlighted right as you type the code? gopls has staticcheck and govet warnings; they are quite useful as you're typing in your code. (Though sometimes a little aggressive. My favorite is highlighting an if statement as an "empty branch" before I've had time to type in any code. I'm working as fast as I can, Mr. Linter!)
- morelisp 4y ago> Why wouldn't you want the lint error to be highlighted right as you type the code? eslint's flymake integration can do this without any language server commitments. LSP maybe offers some performance advantage - but IMO that says more about eslint than LSP or flymake.
- PuercoPop 4y ago> Why wouldn't you want the lint error to be highlighted right as you type the code? Why do you think you need to involve an LSP for that?. ESLint, as most linters, can take their input from stdin. That is exactly how the eslint-flymake[0] works. Lint on buffer contents, not file on disk. No JSON RPC involved. 0: https://github.com/emacs-pe/eslint-flymake/ https://github.com/emacs-pe/eslint-flymake/