Skip to content

Commit 716d7ee

Browse files
authored
feat: add npm-groovy-lint, jq, yamlfmt, yamlfix, xmllint formatters (#49)
* feat: add npm-groovy-lint, jq, yamlfmt, yamlfix, xmllint formatters * fix: use stdin mode for npm-groovy-lint * fix: use eslint configuration when ts config is found * fix: remove redundant -M flag for jq
1 parent 9530991 commit 716d7ee

3 files changed

Lines changed: 44 additions & 0 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,15 @@
2525
- [x] [golines](https://pkg.go.dev/github.com/segmentio/golines)
2626
- [ ] [google-java-format](https://github.com/google/google-java-format)
2727
- [ ] [isort](https://github.com/PyCQA/isort)
28+
- [ ] [jq](https://github.com/jqlang/jq)
2829
- [ ] [ktlint](https://github.com/pinterest/ktlint)
2930
- [ ] [ktfmt](https://github.com/facebook/ktfmt)
3031
- [x] [latexindent](https://github.com/cmhughes/latexindent.pl)
3132
- [ ] [mdformat](https://github.com/executablebooks/mdformat)
3233
- [ ] [mixformat](https://github.com/elixir-lang/elixir/)
3334
- [ ] [nixfmt](https://github.com/serokell/nixfmt)
35+
- [ ] [npm_groovy_lint](https://github.com/nvuillam/npm-groovy-lint) as `npm-groovy-lint --format`
36+
- [ ] [npm_groovy_lint_fix](https://github.com/nvuillam/npm-groovy-lint) as `npm-groovy-lint --fix`
3437
- [ ] [ormolu](https://hackage.haskell.org/package/ormolu)
3538
- [ ] [pg_format](https://github.com/darold/pgFormatter)
3639
- [x] [prettier](https://github.com/prettier/prettier)
@@ -48,6 +51,9 @@
4851
- [x] [yapf](https://github.com/google/yapf)
4952
- [x] [ruff](https://github.com/astral-sh/ruff) as `ruff format`
5053
- [ ] [ruff_fix](https://github.com/astral-sh/ruff) as `ruff --fix`
54+
- [ ] [xmllint](https://gnome.pages.gitlab.gnome.org/libxml2/xmllint.html)
55+
- [ ] [yamlfix](https://github.com/lyz-code/yamlfix)
56+
- [ ] [yamlfmt](https://github.com/google/yamlfmt)
5157
- [ ] [zigfmt](https://github.com/ziglang/zig)
5258

5359
## Linters

lua/guard-collection/formatter.lua

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,4 +287,39 @@ M.biome = {
287287
stdin = true,
288288
}
289289

290+
M.xmllint = {
291+
cmd = 'xmllint',
292+
args = { '--format', '-' },
293+
stdin = true,
294+
}
295+
296+
M.yamlfix = {
297+
cmd = 'yamlfix',
298+
args = { '-' },
299+
stdin = true,
300+
}
301+
302+
M.yamlfmt = {
303+
cmd = 'yamlfmt',
304+
args = { '-' },
305+
stdin = true,
306+
}
307+
308+
M.npm_groovy_lint = {
309+
cmd = 'npm-groovy-lint',
310+
args = { '--format', '-' },
311+
stdin = true,
312+
}
313+
314+
M.npm_groovy_lint_fix = {
315+
cmd = 'npm-groovy-lint',
316+
args = { '--fix', '-' },
317+
stdin = true,
318+
}
319+
320+
M.jq = {
321+
cmd = 'jq',
322+
stdin = true,
323+
}
324+
290325
return M

lua/guard-collection/linter/eslint.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ return {
1414
'eslint.config.js',
1515
'eslint.config.cjs',
1616
'eslint.config.mjs',
17+
'eslint.config.ts',
18+
'eslint.config.cts',
19+
'eslint.config.mts',
1720
},
1821
parse = lint.from_json({
1922
get_diagnostics = function(...)

0 commit comments

Comments
 (0)