From 947fbf06716a86df5948a810c7146c39befd21fe Mon Sep 17 00:00:00 2001 From: Rafael Derolez Date: Wed, 14 Jun 2023 10:21:57 +0200 Subject: [PATCH] fix(typescript): fix null_ls eslint_d registration(s) (#274) --- lua/astrocommunity/pack/typescript/typescript.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/astrocommunity/pack/typescript/typescript.lua b/lua/astrocommunity/pack/typescript/typescript.lua index a000db78a..7a3e570ad 100644 --- a/lua/astrocommunity/pack/typescript/typescript.lua +++ b/lua/astrocommunity/pack/typescript/typescript.lua @@ -66,8 +66,8 @@ return { or util.root_has_file ".prettierrc.json5" or util.root_has_file ".prettierrc.js" or util.root_has_file ".prettierrc.cjs" - or util.root_has_file "prettierrc.config.js" - or util.root_has_file "prettierrc.config.cjs" + or util.root_has_file "prettier.config.js" + or util.root_has_file "prettier.config.cjs" or util.root_has_file ".prettierrc.toml" end @@ -87,9 +87,9 @@ return { opts.handlers.eslint_d = function() local null_ls = require "null-ls" - null_ls.register(null_ls.builtins.diagnostics.eslint_d.with { - condition = function(util) return (has_eslint(util) or not has_prettier(util)) end, - }) + null_ls.register(null_ls.builtins.diagnostics.eslint_d.with { condition = has_eslint }) + null_ls.register(null_ls.builtins.formatting.eslint_d.with { condition = has_eslint }) + null_ls.register(null_ls.builtins.code_actions.eslint_d.with { condition = has_eslint }) end end, },