Skip to content

Commit

Permalink
feat: add twig-cs-fixer (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
fbuchlak authored Feb 20, 2024
1 parent 00f50d4 commit 766812b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lua/conform/formatters/twig-cs-fixer.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
local util = require("conform.util")

---@type conform.FileFormatterConfig
return {
meta = {
url = "https://github.com/VincentLanglet/Twig-CS-Fixer",
description = "Automatically fix Twig Coding Standards issues",
},
command = util.find_executable({
"vendor/bin/twig-cs-fixer",
}, "twig-cs-fixer"),
args = { "lint", "$FILENAME", "--fix", "--no-interaction", "--quiet" },
cwd = util.root_file({
".twig-cs-fixer.php",
".twig-cs-fixer.dist.php",
"composer.json",
}),
require_cwd = false,
stdin = false,
}

0 comments on commit 766812b

Please sign in to comment.