aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2025-11-14 16:18:40 -0500
committerJustin M. Keyes <justinkz@gmail.com>2025-11-14 16:18:40 -0500
commit1e9c9b514f1f28bd93e129158c011913bee9a190 (patch)
tree2a592a710c98ec99971adb0bd2ec875dccd43f13
parentdocs: update configs.md (diff)
downloadnvim-lspconfig-1e9c9b514f1f28bd93e129158c011913bee9a190.tar
nvim-lspconfig-1e9c9b514f1f28bd93e129158c011913bee9a190.tar.gz
nvim-lspconfig-1e9c9b514f1f28bd93e129158c011913bee9a190.tar.bz2
nvim-lspconfig-1e9c9b514f1f28bd93e129158c011913bee9a190.tar.lz
nvim-lspconfig-1e9c9b514f1f28bd93e129158c011913bee9a190.tar.xz
nvim-lspconfig-1e9c9b514f1f28bd93e129158c011913bee9a190.tar.zst
nvim-lspconfig-1e9c9b514f1f28bd93e129158c011913bee9a190.zip
fix(eslint.lua): nonsense passed to list_extend()
-rw-r--r--.github/ci/lint.sh2
-rw-r--r--lsp/eslint.lua5
2 files changed, 3 insertions, 4 deletions
diff --git a/.github/ci/lint.sh b/.github/ci/lint.sh
index a6bf8a1e..8efeac73 100644
--- a/.github/ci/lint.sh
+++ b/.github/ci/lint.sh
@@ -36,7 +36,7 @@ _check_brief_placement() {
}
# Returned object should have `---@type vim.lsp.Config` annotation.
-# TODO: use luals/emmylua type checking in CI: https://github.com/neovim/neovim/pull/33344
+# CI checks luals/emmylua: https://github.com/neovim/nvim-lspconfig/pull/4185
_check_type() {
if git grep --files-without-match '\-\-\-\@type vim\.lsp\.Config' -- 'lsp/*.lua' ; then
_fail 'Missing `---@type vim.lsp.Config` annotation.'
diff --git a/lsp/eslint.lua b/lsp/eslint.lua
index 593d602a..37f51eac 100644
--- a/lsp/eslint.lua
+++ b/lsp/eslint.lua
@@ -201,9 +201,8 @@ return {
-- Support Yarn2 (PnP) projects
local pnp_cjs = root_dir .. '/.pnp.cjs'
local pnp_js = root_dir .. '/.pnp.js'
- if vim.uv.fs_stat(pnp_cjs) or vim.uv.fs_stat(pnp_js) then
- local cmd = config.cmd
- config.cmd = vim.list_extend({ 'yarn', 'exec' }, type(cmd) == 'table' and cmd or {})
+ if type(config.cmd) == 'table' and (vim.uv.fs_stat(pnp_cjs) or vim.uv.fs_stat(pnp_js)) then
+ config.cmd = vim.list_extend({ 'yarn', 'exec' }, config.cmd --[[@as table]])
end
end
end,