From 06804af4f2a8ebbc991bb4c7d369c5208e27b0b6 Mon Sep 17 00:00:00 2001 From: Igor Lacerda Date: Tue, 24 Dec 2024 18:58:16 -0300 Subject: [PATCH] feat: biome organize imports (#599) * feat: biome organize imports * fix: explicitly enable only the import organizer * lint: trailing comma --------- Co-authored-by: Steven Arcangeli <506791+stevearc@users.noreply.github.com> --- .../formatters/biome-organize-imports.lua | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lua/conform/formatters/biome-organize-imports.lua diff --git a/lua/conform/formatters/biome-organize-imports.lua b/lua/conform/formatters/biome-organize-imports.lua new file mode 100644 index 00000000..aaf307d4 --- /dev/null +++ b/lua/conform/formatters/biome-organize-imports.lua @@ -0,0 +1,23 @@ +local util = require("conform.util") +---@type conform.FileFormatterConfig +return { + meta = { + url = "https://github.com/biomejs/biome", + description = "A toolchain for web projects, aimed to provide functionalities to maintain them.", + }, + command = util.from_node_modules("biome"), + stdin = true, + args = { + "check", + "--write", + "--formatter-enabled=false", + "--linter-enabled=false", + "--organize-imports-enabled=true", + "--stdin-file-path", + "$FILENAME", + }, + cwd = util.root_file({ + "biome.json", + "biome.jsonc", + }), +}