From 9bb3a940389dda796192a477a016069472692526 Mon Sep 17 00:00:00 2001 From: George GuimarĂ£es Date: Tue, 31 Oct 2023 11:29:31 -0300 Subject: feat: add markdownlint-cli2 (#171) cli2 is a better cli for markdownlint. It allows to have config files in different directories, and it's also from the same author as the original node.js markdownlint lib. --- lua/conform/formatters/markdownlint-cli2.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 lua/conform/formatters/markdownlint-cli2.lua (limited to 'lua/conform') diff --git a/lua/conform/formatters/markdownlint-cli2.lua b/lua/conform/formatters/markdownlint-cli2.lua new file mode 100644 index 0000000..69e4562 --- /dev/null +++ b/lua/conform/formatters/markdownlint-cli2.lua @@ -0,0 +1,11 @@ +---@type conform.FileFormatterConfig +return { + meta = { + url = "https://github.com/DavidAnson/markdownlint-cli2", + description = "A fast, flexible, configuration-based command-line interface for linting Markdown/CommonMark files with the markdownlint library", + }, + command = "markdownlint-cli2", + args = { "--fix", "$FILENAME" }, + exit_codes = { 0, 1 }, -- code 1 is returned when linting/formatter was successful and there were errors + stdin = false, +} -- cgit v1.2.3-70-g09d2