aaronjensen / eslintd-fix

Emacs minor-mode to automatically fix javascript with eslint_d.
64 stars 8 forks source link

Doesn't work under yarn pnp #15

Open wyuenho opened 4 years ago

wyuenho commented 4 years ago

Thanks for this wonderful package. I recently tried out yarn pnp but this package doesn't seem to work. I think the problem has to do with some eslint-config-* and the command must be invoked with yarn eslint_d. Being able to adjust the executable argument in this package will be need to make this work, but there doesn't seem to be an easy way.

aaronjensen commented 4 years ago

Hi @wyuenho, you're welcome!

You can adjust the actual executable with eslintd-fix-executable, so you could change that to yarn eslint_d if need be, I believe. Does that work for you or are you running into something else?

wyuenho commented 4 years ago

Obviously not, yarn eslint_d isn't an executable lol. It's an executable with one argument. In the code, there is a file-executable-p and executable-find, and there's no way to supply custom args to the executable. There's some amount of rewrite needed to make this work.

aaronjensen commented 4 years ago

Ah, good point! In the interim, you could try creating a script somewhere that runs yarn eslint_d "$@" and point to that.

wyuenho commented 4 years ago

I'm using straight up eslint lint with https://github.com/purcell/reformatter.el for now

aaronjensen commented 4 years ago

Sounds good. Were you able to try the script approach?