-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PSA: ESLINT_USE_FLAT_CONFIG is only evaluated when the daemon starts/restarts #281
Comments
Thank you for reporting and also providing a solution! 😍 A potential solution to this could be the idea to launch a separate process per project as suggested here, which might be the way forward anyway. In the meantime, can I ask you to send a PR for the |
Opened #282 with the I would be in favor of separate processes. I do wonder if this may cause excessive instances in some situations. I don't think it would impact my typical workflow, but here are a few things I checked: A monorepo sharing the same hoisted install. If packages require different config formats, it would be useful. If they do not, it may cause different instances when not needed. I typically only add linters as a dependency and lint from the root project. I'm just not sure what percentage of users do the same.
|
Separate instances could also make the proposed solution for #236 easier to implement, where |
Okay, I could see that working! It would be a great stepping stone at a minimum to tackle some of the issues. Brain dumping a couple thoughts, but I wouldn't call them requirements for the core idea.
|
Thanks for sharing your thoughts, @higherorderfunctor.
As far as I understand coc.nvim seems to launch the process from within a vim plugin, which ties the process to vim. If we'd like to achieve the same, we'd have to create a vim plugin that launches a new This leads to an interesting design decision: If we want separate processes per project, is the If |
Sharing to hopefully save someone else from troubleshooting if they find this by searching.
I was seeing errors like the ones below after things had been working with the new config format. The issue was I launched nvim/ale which started the daemon automatically when opening a source file without
ESLINT_USE_FLAT_CONFIG
. Finally solved with aESLINT_USE_FLAT_CONFIG=true eslint_d restart
.While obvious in hindsight, it took awhile to figure out what was going on.
Additionally, it seems the config style used by the daemon is locked to whatever option was used when the daemon last started/restarted. If I have two projects open, one with the new config format and one with the old format, I will get config errors on the project that doesn't match the mode the daemon is running in.
That said, the "sticky mode" probably saved me a headache with nvim/ale. I prefer to run everything from node_modules and to not install anything globally. Everything works out of the box (so long as the daemon is the correct mode) without having to mess with
ale_javascript_eslint_use_global
andale_javascript_eslint_executable
in my nvim config.Only actionable item I could potentially see is to auto-detect the config format on invocation. That said, if it is not worth the effort, I can live with the limitations now that I understand them.
The text was updated successfully, but these errors were encountered: