Skip to content

Commit 671bec8

Browse files
committed
fix(typescript): respect autoformatting status when applying EslintFixAll
1 parent 17307e7 commit 671bec8

File tree

1 file changed

+3
-1
lines changed
  • lua/astrocommunity/pack/typescript

1 file changed

+3
-1
lines changed

lua/astrocommunity/pack/typescript/init.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ return {
9595
{
9696
event = "BufWritePost",
9797
desc = "Fix all eslint errors",
98-
callback = function() vim.cmd.EslintFixAll() end,
98+
callback = function(args)
99+
if vim.F.if_nil(vim.b[args.buf].autoformat, vim.g.autoformat, true) then vim.cmd.EslintFixAll() end
100+
end,
99101
},
100102
},
101103
},

0 commit comments

Comments
 (0)