Replies: 3 comments 1 reply
-
You could use a condition to achieve this, but honestly I would recommend just using the ESLint language server, which does this out of the box and generally works better than our source. |
Beta Was this translation helpful? Give feedback.
-
Hello @jose-elias-alvarez it worked, didn't even know that there were a language server for eslint... Thank you so much. Do you think that will be a big drawback using eslint instead of eslint_d? |
Beta Was this translation helpful? Give feedback.
-
same error, but I want to disable [TRACE 三 5/17 22:37:18 2023] .../.local/share/nvim/lazy/null-ls.nvim/lua/null-ls/rpc.lua:102: received LSP request for method shutdown
[TRACE 三 5/17 22:37:18 2023] .../.local/share/nvim/lazy/null-ls.nvim/lua/null-ls/rpc.lua:127: received LSP notification for method exit
[DEBUG 三 5/17 22:37:23 2023] ...cal/share/nvim/lazy/null-ls.nvim/lua/null-ls/sources.lua:85: not registering conditional source eslint_d
[DEBUG 三 5/17 22:37:23 2023] ...cal/share/nvim/lazy/null-ls.nvim/lua/null-ls/sources.lua:82: registering conditional source prettierd
[DEBUG 三 5/17 22:37:23 2023] ...cal/share/nvim/lazy/null-ls.nvim/lua/null-ls/sources.lua:82: registering conditional source eslint_d
[TRACE 三 5/17 22:37:25 2023] ...ocal/share/nvim/lazy/null-ls.nvim/lua/null-ls/client.lua:97: starting null-ls client
[TRACE 三 5/17 22:37:25 2023] .../.local/share/nvim/lazy/null-ls.nvim/lua/null-ls/rpc.lua:102: received LSP request for method initialize
[TRACE 三 5/17 22:37:25 2023] .../.local/share/nvim/lazy/null-ls.nvim/lua/null-ls/rpc.lua:127: received LSP notification for method initialized
[TRACE 三 5/17 22:37:25 2023] .../.local/share/nvim/lazy/null-ls.nvim/lua/null-ls/rpc.lua:127: received LSP notification for method textDocument/didOpen
[TRACE 三 5/17 22:37:25 2023] .../share/nvim/lazy/null-ls.nvim/lua/null-ls/generators.lua:21: running generators for method NULL_LS_DIAGNOSTICS_ON_OPEN
[DEBUG 三 5/17 22:37:25 2023] ...y/null-ls.nvim/lua/null-ls/helpers/generator_factory.lua:320: spawning command "eslint_d" at /Users/home/project1 with args { "-f", "json", "--stdin", "--stdin-filename", "/Users/home/project1/src/xxx/request.ts" }
[TRACE 三 5/17 22:37:25 2023] ...y/null-ls.nvim/lua/null-ls/helpers/generator_factory.lua:204: error output: Error: No ESLint configuration found in /Users/home/project1/src/xxx.
[TRACE 三 5/17 22:37:25 2023] ...y/null-ls.nvim/lua/null-ls/helpers/generator_factory.lua:205: output: nil
[TRACE 三 5/17 22:37:25 2023] ...share/nvim/lazy/null-ls.nvim/lua/null-ls/diagnostics.lua:181: received diagnostics from source 4
[TRACE 三 5/17 22:37:25 2023] ...share/nvim/lazy/null-ls.nvim/lua/null-ls/diagnostics.lua:182: { {
col = 0,
end_col = 0,
end_lnum = 1,
lnum = 0,
message = "Error: No ESLint configuration found in /Users/home/project1/src/xxx/request.ts.\n",
severity = 1,
source = "eslint_d",
user_data = {
fixable = false
}
} } |
Beta Was this translation helpful? Give feedback.
-
Hello everyone hope you're well and safe 🙏🏼
Didn't opened an issue because I'm pretty sure that this is a misconfiguration from my side.
What happens is that, I have eslint_d installed with null_ls but if I don't have an eslint file or even eslint installed, it prompts this error:
![Screenshot 2023-03-06 at 14 55 01](https://user-images.githubusercontent.com/64453275/223130198-593e9eec-12c9-46e0-ae7c-27bc64de0953.png)
If I comment the line where it activate the eslint_d, it just don't show that error anymore. I would like to keep it active but only really enable it if I have eslint configuration, if not, I would like to get it disabled. I'm pretty sure it might be something I'm missing in my configuration, here it is my config:
Thanks in advance guys :D every help is appreciated :D
Beta Was this translation helpful? Give feedback.
All reactions