Dokploy / Dokploy/dokploy

Add @dokploy/format-config - Biome for code, Prettier only for Markdown/MDX

Open
#2,631 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
37.4k
Forks
3k
Avg merge
1d 3h
Merged PRs (30d)
73

Description

What problem will this feature address?
  • Repos use pnpm workspaces (both dokploy and website ship a pnpm-workspace.yaml), but each repo currently manages formatter config locally, which leads to drift.
  • Biome is already standard for code; however, Markdown/MDX still needs consistent formatting without letting Prettier touch code. The website repo is ~50% MDX, so MDX support matters.
Describe the solution you'd like

Create a reusable formatting package @dokploy/format-config (as a pnpm workspace package in dokploy under packages/format-config/) and publish it for reuse in website and other repos. The package centralizes:

  • Biome rules for all code.
  • Prettier (defaults) limited to Markdown/MDX only.
1) New workspace package: packages/format-config/

packages/format-config/package.json

{
  "name": "@dokploy/format-config",
  "version": "0.1.0",
  "description": "Shared Dokploy formatting config: Biome for code, Prettier for Markdown only.",
  "license": "MIT",
  "files": [
    "biome.json",
    "prettierignore",
    "prettierrc.json",
    "README.md"
  ],
  "publishConfig": { "access": "public" },
  "peerDependencies": {
    "biome": ">=2.2.0",
    "prettier": ">=3.6.0"
  }
}

packages/format-config/biome.json

Combine:

packages/format-config/prettierignore (whitelist only docs, but maybe .sh also)

# Ignore everything...
**/*

# ...except Markdown
!**/*.md

packages/format-config/prettierrc.json (empty = Prettier defaults)

{}

packages/format-config/README.md (usage doc)

# @dokploy/format-config

- **Code**: Biome
- **Docs**: Prettier for Markdown only (via .prettierignore whitelist)

## Usage
1) pnpm add -D @dokploy/format-config biome prettier
2) In your repo/package `biome.json`:
   { "extends": ["@dokploy/format-config/biome.json"] }
3) Copy `.prettierignore` and (optionally) `.prettierrc` from this package to the repo root.
4) Add scripts:
   "format:code": "biome format --write .",
   "check:code": "biome check .",
   "format:md": "prettier --write \"**/*.md\"",
   "check:md": "prettier --check \"**/*.md\""

2) Root repo changes (consumer)

Install (workspace link):

pnpm add -D @dokploy/format-config@workspace:* biome prettier

Root biome.json (or per-package):

{ "extends": ["@dokploy/format-config/biome.json"] }

Copy to repo root:

  • .prettierignore (from the package; keeps Prettier on *.md only)
  • optional .prettierrc ({})

Root package.json scripts:

{
  "scripts": {
    "format:code": "biome format --write .",
    "check:code": "biome check .",
    "format:md": "prettier --write \"**/*.md\"",
    "check:md": "prettier --check \"**/*.md\""
  }
}

3) Lefthook integration (pre-commit)

⚠️ TODO

4) CI (GitHub Actions snippet)

⚠️ TODO


5) Editor settings (optional, not enforced)

For a smoother local DX, an extra workspace .vscode/settings.json:

{
  "editor.formatOnSave": true,
  "prettier.requireConfig": true,

  "[markdown]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },

  "[javascript]": { "editor.defaultFormatter": "biomejs.biome" },
  "[typescript]": { "editor.defaultFormatter": "biomejs.biome" },
  "[json]": { "editor.defaultFormatter": "biomejs.biome" },
  "[css]": { "editor.defaultFormatter": "biomejs.biome" }
}
Describe alternatives you've considered

Moving over to Prettier completely.

Additional context

No response

Will you send a PR to implement it?

No

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing pnpm-workspace.yaml files, biome.json files in dokploy and website, and the root package.json scripts. Create the files listed under packages/format-config/, then wire the workspace consumer configuration and formatting scripts described in the issue. Done means the shared package is publishable, Biome covers code, and Prettier is limited to Markdown/MDX; Lefthook and CI remain explicitly marked TODO.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown, typescript
Domain
build-system, documentation, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.