From 057f1a354ded2b7328bbf3d8a4d707702000eba3 Mon Sep 17 00:00:00 2001 From: Kayaba Akihiko Date: Thu, 5 Oct 2023 03:25:51 +0700 Subject: [PATCH] feat: register eslint_d formatter (#18) --- README.md | 1 + lua/guard-collection/formatter.lua | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 1df80ee..8967af0 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ - [x] [clang-format](https://www.kernel.org/doc/html/latest/process/clang-format.html) - [ ] [djhtml](https://github.com/rtts/djhtml) - [ ] [dprint](https://dprint.dev/) +- [x] [eslint_d](https://github.com/mantoni/eslint_d.js) - [ ] [fish_indent](https://fishshell.com/docs/current/cmds/fish_indent.html) - [ ] [fnlfmt](https://git.sr.ht/~technomancy/fnlfmt) - [ ] [gofmt](https://pkg.go.dev/cmd/gofmt) diff --git a/lua/guard-collection/formatter.lua b/lua/guard-collection/formatter.lua index 8670174..2f547c0 100644 --- a/lua/guard-collection/formatter.lua +++ b/lua/guard-collection/formatter.lua @@ -43,6 +43,13 @@ M.dprint = { find = { 'dprint.json', 'dprint.jsonc', '.dprint.json', '.dprint.jsonc' }, } +M.eslint_d = { + cmd = 'eslint_d', + args = { '--fix-to-stdout', '--stdin', '--stdin-filename' }, + fname = true, + stdin = true, +} + M.fish_indent = { cmd = 'fish_indent', stdin = true,