diff options
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | doc/conform.txt | 2 | ||||
-rw-r--r-- | lua/conform/formatters/easy-coding-standard.lua | 18 |
3 files changed, 21 insertions, 0 deletions
@@ -183,6 +183,7 @@ To view configured and available formatters, as well as to see the log file, run - [dfmt](https://github.com/dlang-community/dfmt) - Formatter for D source code. - [djlint](https://github.com/Riverside-Healthcare/djLint) - ✨ HTML Template Linter and Formatter. Django - Jinja - Nunjucks - Handlebars - GoLang. - [dprint](https://github.com/dprint/dprint) - Pluggable and configurable code formatting platform written in Rust. +- [easy-coding-standard](https://github.com/easy-coding-standard/easy-coding-standard) - ecs - Use Coding Standard with 0-knowledge of PHP-CS-Fixer and PHP_CodeSniffer. - [elm_format](https://github.com/avh4/elm-format) - elm-format formats Elm source code according to a standard set of rules based on the official [Elm Style Guide](https://elm-lang.org/docs/style-guide). - [erb_format](https://github.com/nebulab/erb-formatter) - Format ERB files with speed and precision. - [eslint_d](https://github.com/mantoni/eslint_d.js/) - Like ESLint, but faster. diff --git a/doc/conform.txt b/doc/conform.txt index 28283fd..5422ff2 100644 --- a/doc/conform.txt +++ b/doc/conform.txt @@ -181,6 +181,8 @@ FORMATTERS *conform-formatter `djlint` - ✨ HTML Template Linter and Formatter. Django - Jinja - Nunjucks - Handlebars - GoLang. `dprint` - Pluggable and configurable code formatting platform written in Rust. +`easy-coding-standard` - ecs - Use Coding Standard with 0-knowledge of PHP-CS- + Fixer and PHP_CodeSniffer. `elm_format` - elm-format formats Elm source code according to a standard set of rules based on the official [Elm Style Guide](https://elm- lang.org/docs/style-guide). diff --git a/lua/conform/formatters/easy-coding-standard.lua b/lua/conform/formatters/easy-coding-standard.lua new file mode 100644 index 0000000..d1ed3a6 --- /dev/null +++ b/lua/conform/formatters/easy-coding-standard.lua @@ -0,0 +1,18 @@ +local util = require("conform.util") + +---@type conform.FileFormatterConfig +return { + meta = { + url = "https://github.com/easy-coding-standard/easy-coding-standard", + description = "ecs - Use Coding Standard with 0-knowledge of PHP-CS-Fixer and PHP_CodeSniffer.", + }, + command = util.find_executable({ + "vendor/bin/ecs", + }, "ecs"), + args = { "check", "$FILENAME", "--fix", "--no-interaction" }, + cwd = util.root_file({ + "ecs.php", + }), + require_cwd = true, + stdin = false, +} |