adds eslint config

This commit is contained in:
Dennis 2026-02-06 10:13:06 +01:00
parent f30eee938c
commit 5dd67bbedf

View file

@ -51,6 +51,68 @@
"eslint.config.mts"
"eslint.config.cts"
];
settings = {
validate = "on";
useESLintClass = false;
experimental = {
useFlatConfig = false;
};
codeActionOnSave = {
enable = false;
mode = "all";
};
format = true;
quiet = false;
onIgnoredFiles = "off";
rulesCustomizations = { };
run = "onType";
problems = {
shortenToSingleLine = false;
};
nodePath = "";
workingDirectory = {
mode = "auto";
};
codeAction = {
disableRuleComment = {
enable = true;
location = "separateLine";
};
showDocumentation = {
enable = true;
};
};
};
handlers = {
"eslint/openDoc".__raw = /* lua */ ''
function(_, result)
if result then
vim.ui.open(result.url)
end
return {}
end
'';
"eslint/confirmESLintExecution" = /* lua */ ''
function(_, result)
if not result then
return
end
return 4 -- approved
end
'';
"eslint/probeFailed" = /* lua */ ''
function()
vim.notify("[lspconfig] ESLint probe failed.", vim.log.levels.WARN)
return {}
end
'';
"eslint/noLibrary" = /* lua */ ''
function()
vim.notify("[lspconfig] Unable to find ESLint library.", vim.log.levels.WARN)
return {}
end
'';
};
before_init.__raw = /* lua */ ''
function(_, config)
local eslint_config_files = {