-
Notifications
You must be signed in to change notification settings - Fork 787
feat(builtins): add xo code actions and diagnostics #707
feat(builtins): add xo code actions and diagnostics #707
Conversation
These changes seem to make things work on my end: diff --git a/lua/null-ls/builtins/diagnostics/xo.lua b/lua/null-ls/builtins/diagnostics/xo.lua
index 6e849ea..0903615 100644
--- a/lua/null-ls/builtins/diagnostics/xo.lua
+++ b/lua/null-ls/builtins/diagnostics/xo.lua
@@ -29,9 +29,9 @@ return h.make_builtin({
filetypes = { "javascript", "javascriptreact", "typescript", "typescriptreact" },
generator_opts = {
command = "xo",
- args = { "--stdin", "--stdin-filename", "$FILENAME" },
+ args = { "--reporter", "json", "--stdin", "--stdin-filename", "$FILENAME" },
to_stdin = true,
- -- format = "json_raw",
+ format = "json",
check_exit_code = function(code)
return code <= 1
end, I think that should work as a starting point. I also see that |
Thanks for the help 😌 So now we have:
I agree that extending ESLint should be fine. I'm curious why ESLint diagnostics/code actions use |
Right, the Formatting is a bit of a special case. We should investigate whether |
I'll look into the |
This reverts commit f1618ba.
Removed formatting as Are docs generated automatically or should I add those? (If not automatic, is there a preference on ordering when adding a new builtin?) |
Docs are still done manually, ideally in alphabetical order. |
Excellent, glad we were able to get this solved with the minimal amount of code. Thanks for the contribution! |
So far unable to get this to work properly. Help/feedback is much appreciated. I'll continue playing with this and hopefully get something working here 😌
Closes #702