feat: updated eslint

This commit is contained in:
Kemboi Elvis 2025-06-04 12:24:19 +03:00
parent 42fc9a4d66
commit 1c5312d637

View file

@ -1,9 +1,11 @@
if lazyvim_docs then if lazyvim_docs then
-- Set to false to disable auto format -- Set to false to disable auto format
vim.g.lazyvim_eslint_auto_format = true vim.g.lazyvim_eslint_auto_format = true
vim.g.lazyvim_eslint_auto_fix_all = true
end end
local auto_format = vim.g.lazyvim_eslint_auto_format == nil or vim.g.lazyvim_eslint_auto_format 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 { return {
{ {
@ -17,6 +19,24 @@ return {
-- helps eslint find the eslintrc when it's placed in a subfolder instead of the cwd root -- helps eslint find the eslintrc when it's placed in a subfolder instead of the cwd root
workingDirectories = { mode = "auto" }, workingDirectories = { mode = "auto" },
format = auto_format, 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,
}, },
}, },
}, },