スキル一覧に戻る
jasonkuhrt

dprint

by jasonkuhrt

Tool configurations

1🍴 0📅 2026年1月22日
GitHubで見るManusで実行

SKILL.md


name: dprint description: Use when working with dprint formatter - configuration, plugins, CLI commands, editor integration, or global setup.

dprint

Fast pluggable code formatter.

Config Resolution

CC Misconception: "dprint is project-local only." Wrong. dprint supports:

  1. Ancestor lookup - walks UP directory tree for dprint.json
  2. Global fallback - ~/.config/dprint/dprint.json (or DPRINT_CONFIG_DIR)
  3. Explicit path - dprint fmt -c /path/to/config.json
Discovery ModeBehavior
--config-discovery=trueDefault: ancestor + global
--config-discovery=globalGlobal only
--config-discovery=falseRequire explicit -c

No config found anywhere → dprint errors.

Plugins

Plugins are WASM files loaded via URL in dprint.json:

{
  "plugins": [
    "https://plugins.dprint.dev/typescript-0.95.13.wasm",
    "https://plugins.dprint.dev/json-0.21.1.wasm",
    "https://plugins.dprint.dev/markdown-0.20.0.wasm"
  ]
}

Common plugins:

  • typescript - TS/JS/JSX/TSX
  • json - JSON/JSONC
  • markdown - Markdown
  • toml - TOML
  • g-plane/pretty_yaml - YAML
  • g-plane/malva - CSS/SCSS/Less
  • g-plane/pretty_graphql - GraphQL

Plugin config - top-level keys match plugin name:

{
  "typescript": { "quoteStyle": "preferSingle", "semiColons": "asi" },
  "markdown": { "lineWidth": 100, "textWrap": "maintain" }
}

Update plugins: Check https://plugins.dprint.dev for latest versions.

CLI Commands

dprint fmt                    # Format files, write to disk
dprint check                  # Check if files need formatting (CI)
dprint fmt --diff             # Show diff without writing
dprint fmt --staged           # Format only git staged files
dprint fmt --stdin ts         # Format stdin as TypeScript
dprint fmt "src/**/*.ts"      # Format specific patterns
dprint init                   # Create dprint.json
dprint config update          # Update plugin versions
dprint clear-cache            # Clear plugin cache
dprint lsp                    # Start language server

Editor Integration

Zed

{
  "formatter": {
    "external": {
      "command": "dprint",
      "arguments": ["fmt", "--stdin", "{buffer_path}"]
    }
  }
}

VS Code

Install "dprint" extension. It uses dprint LSP automatically.

Neovim

Use null-ls or conform.nvim with dprint as formatter.

Dotfiles Pattern

For consistent formatting across all projects:

# 1. Create config in dotfiles
~/<dotfiles>/dprint/dprint.json

# 2. Set global config location (in shell rc)
export DPRINT_CONFIG_DIR="$HOME/<dotfiles>/dprint"

# Alternative: symlink to default location
mkdir -p ~/.config/dprint
ln -s ~/<dotfiles>/dprint/dprint.json ~/.config/dprint/dprint.json

Projects with local dprint.json override global. Projects without use global.

Excludes

{
  "excludes": [
    "**/node_modules",
    "**/*-lock.json",
    "**/dist",
    "**/build"
  ]
}

Reference

dprint help              # All commands
dprint help fmt          # Format command options
dprint output-resolved-config  # Debug: show effective config

スコア

総合スコア

55/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

レビュー

💬

レビュー機能は近日公開予定です