From 03107f58d3224bb6b8dee30f13edd776cdab8ba4 Mon Sep 17 00:00:00 2001 From: xiaoshihou Date: Wed, 13 Sep 2023 12:20:47 +0800 Subject: [PATCH] chore: remove prettierd support for now --- README.md | 1 - lua/guard-collection/formatter.lua | 7 ------- test/formatter/prettierd_spec.lua | 18 ------------------ 3 files changed, 26 deletions(-) delete mode 100644 test/formatter/prettierd_spec.lua diff --git a/README.md b/README.md index f47951f..661227f 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,6 @@ - [x] [latexindent](https://github.com/cmhughes/latexindent.pl) - [ ] [pg_format](https://github.com/darold/pgFormatter) - [x] [prettier](https://github.com/prettier/prettier) -- [x] [prettierd](https://github.com/fsouza/prettierd) - [ ] [rubocop](https://github.com/rubocop/rubocop) - [x] [rustfmt](https://github.com/rust-lang/rustfmt) - [ ] [shfmt](https://github.com/mvdan/sh) diff --git a/lua/guard-collection/formatter.lua b/lua/guard-collection/formatter.lua index 9918a11..84baf57 100644 --- a/lua/guard-collection/formatter.lua +++ b/lua/guard-collection/formatter.lua @@ -93,13 +93,6 @@ M.prettier = { stdin = true, } -M.prettierd = { - cmd = 'prettierd', - args = { '--stdin-filepath' }, - stdin = true, - fname = true, -} - M.rubocop = { cmd = 'bundle', args = { 'exec', 'rubocop', '-A', '-f', 'quiet', '--stderr', '--stdin' }, diff --git a/test/formatter/prettierd_spec.lua b/test/formatter/prettierd_spec.lua deleted file mode 100644 index b54c08d..0000000 --- a/test/formatter/prettierd_spec.lua +++ /dev/null @@ -1,18 +0,0 @@ -describe('prettierd', function() - it('can format', function() - local ft = require('guard.filetype') - ft('javascript'):fmt('prettierd') - require('guard').setup() - - local formatted = require('test.formatter.helper').test_with('javascript', { - [[ const randomNumber = Math.floor(]], - [[ Math.random() * 10]], - [[ ) + 1]], - [[alert(randomNumber)]], - }) - assert.are.same({ - [[const randomNumber = Math.floor(Math.random() * 10) + 1;]], - [[alert(randomNumber);]], - }, formatted) - end) -end)