vim-autoformat / vim-autoformat

Provide easy code formatting in Vim by integrating existing code formatters.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement a better lookup for ESLint and NodeJS executables in general

itaranto opened this issue · comments

Right now for ESLint, it checks the following dirs:

  • node_modules/.bin/eslint
  • ~/.npm-global/bin/eslint
  • /usr/local/bin/eslint'

But it doesn't check if the executable is in the PATH variable at all.
My suggestion would be to check if the executable is in PATH, or at least if can be executed as it is, i.e. eslint.

In my case eslint doesn't work because I configured NodeJS to use more standard places like ~/.local/lib and ~/.local/bin.

I agree that the case where eslint is in the PATH could be added.