From 354fd718875e6a5fb74990568230d4f75f8aad67 Mon Sep 17 00:00:00 2001 From: Edwin Hernandez Date: Wed, 1 Jul 2026 11:49:11 -0500 Subject: [PATCH] chore: consolidate formatter ignores into treefmt taplo.toml held only include/exclude globs and no formatting rules, and .prettierignore only listed paths. treefmt already dispatches both tools by glob, so move the excludes (*.tmpl and the vendored tests/test_helpers libraries) into the prettier and taplo formatter blocks and delete the two root files. treefmt now owns all file selection; mise format reports no change, so output is identical. Fixes DOT-48 --- .prettierignore | 13 ------------- taplo.toml | 7 ------- treefmt.toml | 11 ++++++++--- 3 files changed, 8 insertions(+), 23 deletions(-) delete mode 100644 .prettierignore delete mode 100644 taplo.toml diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 40a4eaa..0000000 --- a/.prettierignore +++ /dev/null @@ -1,13 +0,0 @@ -# Files prettier should skip when run from the repo root. -# Mirrors the exclusions previously inline in scripts/lint.sh + format.sh. - -# Vendored bats companion libraries (third-party, not our style). -tests/test_helpers/ - -# Chezmoi templates: contain Go template syntax (`{{ ... }}`) which prettier -# cannot parse as YAML, Markdown, or JSON. -*.tmpl - -# Build artifacts and runtime state. -.git/ -.worktrees/ diff --git a/taplo.toml b/taplo.toml deleted file mode 100644 index b293856..0000000 --- a/taplo.toml +++ /dev/null @@ -1,7 +0,0 @@ -include = ["**/*.toml"] -exclude = [ - "**/*.tmpl", - "**/.git/**", - "**/.worktrees/**", - "tests/test_helpers/**", -] diff --git a/treefmt.toml b/treefmt.toml index 0e889c3..2daa174 100644 --- a/treefmt.toml +++ b/treefmt.toml @@ -1,6 +1,10 @@ # treefmt: one formatter per file type. Walks the tree, respects .gitignore, -# and dispatches to each tool. Replaces the hand-rolled shell-file discovery -# that the mise format/lint tasks used to duplicate. +# and dispatches to each tool. Owns all file selection so no per-tool ignore +# files (.prettierignore, taplo.toml) are needed at the repo root. +# +# Chezmoi templates (*.tmpl) hold Go template syntax that these formatters +# cannot parse. Vendored bats libraries under tests/test_helpers are third +# party and stay unformatted. [formatter.shfmt] command = "shfmt" @@ -12,9 +16,10 @@ excludes = ["*.tmpl"] command = "prettier" options = ["--write"] includes = ["*.md", "*.yaml", "*.yml", "*.json"] +excludes = ["*.tmpl", "tests/test_helpers/**"] [formatter.taplo] command = "taplo" options = ["fmt"] includes = ["*.toml"] -excludes = ["*.tmpl"] +excludes = ["*.tmpl", "tests/test_helpers/**"]