Closed jose-elias-alvarez closed 2 years ago
@jose-elias-alvarez it seems that ESLint is not longer discovered from the local node_modules
folder. I.e. if I don't have eslint globally installed plugin won't work correctly. Is that expected after this changes?
@VVKot The mechanism to resolve the ESLint path shouldn't have changed, theoretically, though there were some other changes (using nvim-lspconfig's utils to handle paths) that could be causing issues. Could you set debug = true
in your config and post the output from :messages
?
using system executable eslint
using system executable eslint
enabling null-ls eslint code actions integration
successfully registered null-ls integrations
E5108: Error executing lua ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:14: The coroutine failed with this message: ...e/pack/packer/start/null-ls.nvim/lua/null-ls/helpers.lua:147: command eslint is not executable (make sure it's installed and on your $PATH)
Sorry, missed that. See output above, seems that we're confusing system executable for the one in local node_modules
folder. I.e. in this repo/machine case I don't have a ESLint at my path, so I can't do :!eslint
but I can do :!node_modules/.bin/eslint
. @jose-elias-alvarez
I see, so something is going wrong with the way the plugin is resolving the path. Could you open another issue and post the output from running :lua require("nvim-lsp-ts-utils.utils").buffer.root()
and :lua require("nvim-lsp-ts-utils.utils").resolve_bin("eslint")
with a project file loaded? I won’t have time to debug / investigate this for a bit but maybe we can catch something obvious.
02ea3e319fb4894ed974b4ddf001417f1e25c4db exposes the built-in options for the ESLint and formatting sources registered via this plugin, which allows full configuration of basically any aspect of these sources (while still maintaining the convenience of registering them on
tsserver
attach and automatically resolving local executables).The commit removed the following options:
eslint_show_rule_id
eslint_disable_if_no_config
eslint_config_fallback
formatter_config_fallback
All of these can be handled by modifying
eslint_opts
/formatter_opts
:eslint_show_rule_id
eslint_disable_if_no_config
eslint_config_fallback
formatter_config_fallback
Note that even if you're using
eslint
oreslint_d
as a formatter, you still want to modify options viaformatter_opts
, to allow separation.The commit also made the sources registered by this plugin specific to
tsserver
filetypes, to avoid unwanted interactions with unspecified filetypes. Users who want to use these sources for other filetypes should register the built-ins directly via null-ls.