fix(prettier): fix prettier config detection. Closes #3497

This commit is contained in:
Folke Lemaitre
2024-06-06 16:15:37 +02:00
parent 3654098520
commit e51199cffa

View File

@ -58,7 +58,7 @@ return {
end
if enabled[ctx.filename] == nil then
enabled[ctx.filename] = vim.fs.find(function(name, path)
return name:match("^%.prettierrc%.") or name:match("^prettier%.config%.")
return name:match("^%.prettierrc%.?") or name:match("^prettier%.config%.")
end, { path = ctx.filename, upward = true })[1] ~= nil
end
return enabled[ctx.filename]