diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf2e712..90d03b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -205,7 +205,7 @@ jobs: uses: furedea/reusable-workflows/.github/actions/nix-setup@2ae953294b9a805d0705657adc1d9d4f1bc1f646 # v1.3.0 - name: Run dprint - run: dprint check --config dprint/dprint.json --incremental=false + run: dprint check --incremental=false - name: Run autocorrect run: autocorrect . --lint --no-diff-bg-color diff --git a/README.md b/README.md index 411ce4f..e5f0274 100644 --- a/README.md +++ b/README.md @@ -225,7 +225,7 @@ The following repository sources are linked directly into the home directory: | `ghostty/config` | `~/.config/ghostty/config` | | `karabiner/karabiner.json` | `~/.config/karabiner/karabiner.json` | | `herdr/config.toml`, `herdr/reviewr.toml` | Herdr config and reviewr plugin config | -| `dprint/dprint.json` | `~/dprint.json` | +| `dprint.json` | `~/dprint.json` | | `.editorconfig` | `~/.editorconfig` | Git, GitHub CLI, Lazygit, Atuin, Yazi, Zsh plugin paths, and rendered agent files @@ -249,7 +249,6 @@ reference files. ├── starship/ # Shell prompt ├── github/ # Repository creation and policy scripts ├── tests/ # Python contracts and Bats integration by domain -├── dprint/ # Global formatter configuration └── tinycast/ # Manual settings export ``` diff --git a/dprint/dprint.json b/dprint.json similarity index 100% rename from dprint/dprint.json rename to dprint.json diff --git a/lefthook.yml b/lefthook.yml index afda387..33b1b26 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -23,7 +23,7 @@ pre-commit: run: autocorrect --lint {all_files} dprint: glob: "*.{json,toml,md}" - run: dprint check --config ~/dprint.json {all_files} + run: dprint check {all_files} # ----- lint ----- shellcheck: glob: "*.sh" diff --git a/nix/home/default.nix b/nix/home/default.nix index da29de9..15e6e71 100644 --- a/nix/home/default.nix +++ b/nix/home/default.nix @@ -791,7 +791,7 @@ in ".vimrc".source = link "vim/.vimrc"; # dprint (global formatter config — dprint looks for ~/dprint.json by default) - "dprint.json".source = link "dprint/dprint.json"; + "dprint.json".source = link "dprint.json"; # EditorConfig (global fallback for projects without their own) ".editorconfig".source = link ".editorconfig"; diff --git a/tests/esa/format.bats b/tests/esa/format.bats index 6227f12..b77f273 100644 --- a/tests/esa/format.bats +++ b/tests/esa/format.bats @@ -8,7 +8,7 @@ setup() { } format_markdown() { - dprint fmt --config "$REPO_ROOT/dprint/dprint.json" --stdin article.md + dprint fmt --config "$REPO_ROOT/dprint.json" --stdin article.md } @test "Markdown formatting preserves line breaks in esa prose" { @@ -29,7 +29,7 @@ format_markdown() { local _outside="$BATS_TEST_TMPDIR/outside/post.md" mkdir -p "${_outside%/*}" - run --separate-stderr dprint fmt --config "$REPO_ROOT/dprint/dprint.json" --stdin "$_outside" < <(printf -- '- parent\n - child\n') + run --separate-stderr dprint fmt --config "$REPO_ROOT/dprint.json" --stdin "$_outside" < <(printf -- '- parent\n - child\n') [ "$status" -eq 0 ] [ "$output" = $'- parent\n - child' ]