adds eslint config
This commit is contained in:
parent
f30eee938c
commit
5dd67bbedf
1 changed files with 62 additions and 0 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue