Skip to content

LSP ESlint integration

Ezequiel Birman edited this page Jan 2, 2020 · 6 revisions

Installation

  1. Download the latest version of VScode ESlint from VScode marketplace and unzip it(alternatively, clone and build https://github.com/Microsoft/vscode-eslint). Make sure that lsp-eslint-server-command points to the correct location1 .
(setq lsp-eslint-server-command 
   '("node" 
     "/home/USER/.vscode/extensions/dbaeumer.vscode-eslint-2.0.11/server/out/eslintServer.js" 
     "--stdio"))
  1. Install eslint either locally globally via:
npm install -g eslint
  1. Invoke M-x lsp in html, js, ts buffers.
  2. Enjoy

1: Tilde expansion won't work as expected resulting in the string being appended to your project's root directory. eg: /usr/local/src/my-app/\~/.vscode/extensions/...

Clone this wiki locally