From 1c5312d637b89fb91e406dd669732a3f906df7de Mon Sep 17 00:00:00 2001 From: Kemboi Elvis Date: Wed, 4 Jun 2025 12:24:19 +0300 Subject: [PATCH] feat: updated eslint --- lua/lazyvim/plugins/extras/linting/eslint.lua | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lua/lazyvim/plugins/extras/linting/eslint.lua b/lua/lazyvim/plugins/extras/linting/eslint.lua index 01f134e2..334a3350 100644 --- a/lua/lazyvim/plugins/extras/linting/eslint.lua +++ b/lua/lazyvim/plugins/extras/linting/eslint.lua @@ -1,9 +1,11 @@ if lazyvim_docs then -- Set to false to disable auto format vim.g.lazyvim_eslint_auto_format = true + vim.g.lazyvim_eslint_auto_fix_all = true end local auto_format = vim.g.lazyvim_eslint_auto_format == nil or vim.g.lazyvim_eslint_auto_format +local auto_fix_all = vim.g.lazyvim_eslint_auto_fix_all == nil or vim.g.lazyvim_eslint_auto_fix_all return { { @@ -17,6 +19,24 @@ return { -- helps eslint find the eslintrc when it's placed in a subfolder instead of the cwd root workingDirectories = { mode = "auto" }, format = auto_format, + codeActionOnSave = { + enable = true, + mode = "all", + }, + validate = "on", + probe = { + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "vue", + "html", + "markdown", + "json", + "jsonc", + }, + autoFixOnSave = auto_fix_all, + quiet = false, }, }, },