fix ruff/Ruff duplication

This commit is contained in:
Ray Elliott 2025-12-07 23:48:11 +00:00
commit b56d703662
5 changed files with 50 additions and 8 deletions

View file

@ -15,7 +15,7 @@ return {
typescriptreact = { "eslint_d" },
markdown = { "markdownlint" },
php = { "phpcs" },
python = { "ruff" },
python = { "ruff" }, -- Code quality/style checks (pyright handles types)
}
-- Helper: Find project-local executable, fallback to global
@ -69,8 +69,18 @@ return {
-- Configure markdownlint
lint.linters.markdownlint.cmd = find_executable({ "markdownlint" }) or "markdownlint"
-- Configure ruff for Python
-- Configure ruff for Python linting (separate from formatting)
lint.linters.ruff.cmd = find_executable({ "ruff" }) or "ruff"
lint.linters.ruff.args = {
"check",
"--select", "ALL", -- All rules
"--ignore", "E501,E999", -- Ignore line length (formatter handles) and syntax errors (pyright handles)
"--force-exclude",
"--quiet",
"--output-format", "json",
"--stdin-filename", function() return vim.api.nvim_buf_get_name(0) end,
"-",
}
-- Auto-lint on these events
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })