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/**"]