Help needed to stop two competing servers formatting javascript 😅

https://s.natalian.org/2021-11-16/eslint-tsserver.mp4 demonstrates the problem. I think what’s happening is the tsserver & eslint are fighting it out. If I format via a lua vim.lsp.buf.formatting() the two styles get applied interchangeably!

What I want: If .eslintrc exists in my project, use that, else tsserver all the way…

tsserver output:

Sidenote: I’m also keen to remove those weird underscores ___

To reproduce:

  1. git clone GitHub - kaihendry/lambda-test
  2. docker run -it --rm --entrypoint=bash -v $(pwd):/src hendry/nvim:latest

Thank you for any pointers in advance. I’d rather use lsp than rely additionally on null-ls btw.

I think I have a solution via Avoiding LSP formatting conflicts · jose-elias-alvarez/null-ls.nvim Wiki · GitHub