add custom eslint config

This commit is contained in:
Andrzej Stepien 2024-03-14 12:53:45 +01:00
parent b5983a8f4b
commit adc127a8c1
1 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,40 @@
local M = {}
local on_attach = function(client, bufnr)
client.server_capabilities.documentFormattingProvider = true
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
end
M.on_attach = on_attach;
M.settings = {
codeAction = {
disableRuleComment = {
enable = true,
location = "separateLine"
},
showDocumentation = {
enable = true
}
},
codeActionOnSave = {
enable = false,
mode = "all"
},
format = true,
nodePath = "",
onIgnoredFiles = "off",
packageManager = "npm",
quiet = false,
rulesCustomizations = {},
run = "onType",
useESLintClass = false,
validate = "on",
workingDirectory = {
mode = "location"
}
}
return M