orzechowskid / flymake-eslint

Flymake backend for Javascript using eslint
MIT License
43 stars 11 forks source link

Prefer locally installed eslint when looking for the executable #29

Closed hochata closed 8 months ago

hochata commented 1 year ago

Thanks for this package! I find it very useful on my day to day.

I had some free time so I decided to implement #26.

This will prefer the locally installed executable, but will fallback to the global one if there is no local installation. This behavior can also be reversed by setting the flymake-eslint-prefer-global custom option.

ghost commented 11 months ago

Hey @hochata thanks for this PR! I just wanted to note that on non-FHS compliant systems like Guix or Nix this patch won't work. In Guix, for instance, variables for executable names (in this case flymake-eslint-executable-name) in Elisp libraries are patched with the corresponding store executable (e.g. "/gnu/store/kc0ac56si4lanlb5hpggng1dnk3cwvfb-node-eslint-8.17.0/bin/eslint") so it would be great if your patch could account for this by using the whole path to the project-local eslint executable.

hochata commented 11 months ago

Thanks for the heads up. I'll try to accommodate for that use case!

DamienCassou commented 9 months ago

This PR has conflicts.

hochata commented 8 months ago

I think #34 might be a more flexible solution, so I'll close this.