diff options
author | Frederik Buchlák <30214087+fbuchlak@users.noreply.github.com> | 2023-10-27 14:26:49 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-27 07:26:49 -0700 |
commit | 253878436e2b6d73dfd91ccf0ac12d04cc683d34 (patch) | |
tree | efa8acb9130344b138303f2734dcc262a6c5aa2e | |
parent | 4653408d5c270168e31ffd0585d1cf2de27fc827 (diff) |
feat: add tlint (#162)
* feat: add tlint
* update doc
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | doc/conform.txt | 2 | ||||
-rw-r--r-- | lua/conform/formatters/tlint.lua | 14 |
3 files changed, 17 insertions, 0 deletions
@@ -258,6 +258,7 @@ You can view this list in vim with `:help conform-formatters` - [taplo](https://github.com/tamasfe/taplo) - A TOML toolkit written in Rust. - [templ](https://templ.guide/commands-and-tools/cli/#formatting-templ-files) - Formats templ template files. - [terraform_fmt](https://www.terraform.io/docs/cli/commands/fmt.html) - The terraform-fmt command rewrites `terraform` configuration files to a canonical format and style. +- [tlint](https://github.com/tighten/tlint) - Tighten linter for Laravel conventions with support for auto-formatting. - [trim_newlines](https://www.gnu.org/software/gawk/manual/gawk.html) - Trim new lines with awk. - [trim_whitespace](https://www.gnu.org/software/gawk/manual/gawk.html) - Trim whitespaces with awk. - [uncrustify](https://github.com/uncrustify/uncrustify) - A source code beautifier for C, C++, C#, ObjectiveC, D, Java, Pawn and Vala. diff --git a/doc/conform.txt b/doc/conform.txt index 505261c..82d7bea 100644 --- a/doc/conform.txt +++ b/doc/conform.txt @@ -277,6 +277,8 @@ FORMATTERS *conform-formatter `templ` - Formats templ template files. `terraform_fmt` - The terraform-fmt command rewrites `terraform` configuration files to a canonical format and style. +`tlint` - Tighten linter for Laravel conventions with support for auto- + formatting. `trim_newlines` - Trim new lines with awk. `trim_whitespace` - Trim whitespaces with awk. `uncrustify` - A source code beautifier for C, C++, C#, ObjectiveC, D, Java, diff --git a/lua/conform/formatters/tlint.lua b/lua/conform/formatters/tlint.lua new file mode 100644 index 0000000..b1f34e6 --- /dev/null +++ b/lua/conform/formatters/tlint.lua @@ -0,0 +1,14 @@ +local util = require("conform.util") + +---@type conform.FileFormatterConfig +return { + meta = { + url = "https://github.com/tighten/tlint", + description = "Tighten linter for Laravel conventions with support for auto-formatting.", + }, + command = util.find_executable({ + "vendor/bin/tlint", + }, "tlint"), + args = { "format", "$FILENAME" }, + stdin = false, +} |