Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ts-standard #106

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ To view configured and available formatters, as well as to see the log file, run
- [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.
- [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
- [ts-standard](https://www.npmjs.com/package/ts-standard) - TypeScript Style Guide, with linter and automatic code fixer based on StandardJS
- [uncrustify](https://github.com/uncrustify/uncrustify) - A source code beautifier for C, C++, C#, ObjectiveC, D, Java, Pawn and Vala.
- [xmlformat](https://github.com/pamoller/xmlformatter) - xmlformatter is an Open Source Python package, which provides formatting of XML documents.
- [yamlfix](https://github.com/lyz-code/yamlfix) - A configurable YAML formatter that keeps comments.
Expand Down
2 changes: 2 additions & 0 deletions doc/conform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ FORMATTERS *conform-formatter
files to a canonical format and style.
`trim_newlines` - Trim new lines with awk
`trim_whitespace` - Trim whitespaces with awk
`ts-standard` - TypeScript Style Guide, with linter and automatic code fixer
based on StandardJS
`uncrustify` - A source code beautifier for C, C++, C#, ObjectiveC, D, Java,
Pawn and Vala.
`xmlformat` - xmlformatter is an Open Source Python package, which provides
Expand Down
12 changes: 12 additions & 0 deletions lua/conform/formatters/ts-standard.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
local util = require("conform.util")

---@type conform.FileFormatterConfig
return {
meta = {
url = "https://www.npmjs.com/package/ts-standard",
description = "TypeScript Style Guide, with linter and automatic code fixer based on StandardJS",
},
command = util.from_node_modules("ts-standard"),
args = { "--fix", "--stdin", "$FILENAME" },
}