Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: replace prettier with dprint #1322

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from
Draft

chore: replace prettier with dprint #1322

wants to merge 4 commits into from

Conversation

pano9000
Copy link
Member

@pano9000 pano9000 commented Mar 2, 2025

Hi,

this PR replaces prettier with dprint.

Reasons why:

On the other hand - there is a lot more flexibility with dprint config:
https://dprint.dev/plugins/typescript/config

The rules still might need some fine-tuning, so I'll leave the PR in draft, until we agree on a final rule set maybe.

Currently I only have a config for TS/JS that looks like this, which is partially based on the previously used prettier config.

  "typescript": {
    "indentWidth": 4,
    "quoteStyle": "preferDouble",
    "semiColons": "prefer",
    "quoteProps": "asNeeded",
    "newLineKind": "lf",
    "lineWidth": 200,
    "trailingCommas": "never",
    "arrayPattern.spaceAround": true,
    "arrayExpression.spaceAround": true
  },

pano9000 added 4 commits March 2, 2025 22:37
add initial dprint configuration, settings partially taken from the prettier config,

still might need some finetuning
replaced by dprint due to its configurability
also renaming the script from "dev:prettier" to a more "generic" term "dev:format"
@pano9000
Copy link
Member Author

pano9000 commented Mar 4, 2025

regarding adding blank spaces between class blocks:

dprint/dprint-plugin-typescript#7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant