fix linting again in bcr 😓

This commit is contained in:
Thomas Ruoff
2025-11-25 08:02:34 +01:00
parent 1f9516ad6f
commit 355cb0bb96
3 changed files with 16 additions and 2 deletions

View File

@@ -17,11 +17,21 @@ return {
format_on_save = {
timeout_ms = 500,
lsp_format = 'fallback',
async = true,
},
formatters = {
eslint_d = {
cwd = function() return vim.fn.getcwd() end,
},
},
formatters_by_ft = {
lua = { 'stylua' },
css = { 'stylelint' },
json = { 'eslint_d' },
javascript = { 'eslint_d' },
javascriptreact = { 'eslint_d' },
typescript = { 'eslint_d' },
typescriptreact = { 'eslint_d' },
['*'] = { 'codespell', 'trim_whitespace' },
},
},

View File

@@ -5,6 +5,10 @@ return {
local lint = require 'lint'
lint.linters_by_ft = {
make = { 'checkmake' },
javascript = { 'eslint' },
javascriptreact = { 'eslint' },
typescript = { 'eslint' },
typescriptreact = { 'eslint' },
}
-- Create autocommand which carries out the actual linting
@@ -13,7 +17,7 @@ return {
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
group = lint_augroup,
callback = function()
if vim.bo.modifiable then lint.try_lint(nil, { ignore_errors = false, cwd = vim.fn.getcwd() }) end
if vim.bo.modifiable then lint.try_lint(nil, { ignore_errors = false }) end
end,
})
end,

View File

@@ -254,7 +254,7 @@ return {
},
},
eslint = { enable = true },
rust_analyzer = { enable = true },
bashls = { enable = true },
cssls = { enable = true },
html = { enable = true },