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

Merged
merged 4 commits into from
Mar 27, 2025
Merged

chore: replace prettier with dprint #1322

merged 4 commits into from
Mar 27, 2025

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
Copy link
Member Author

pano9000 commented Mar 4, 2025

regarding adding blank spaces between class blocks:

dprint/dprint-plugin-typescript#7

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 pano9000 marked this pull request as ready for review March 27, 2025 20:45
@pano9000
Copy link
Member Author

I've got rid of merge conflicts and force pushed it -> you can merge this if you want, and we can later still refine the configuration, if necessary -> https://dprint.dev/plugins/typescript/config/

@eliandoran eliandoran merged commit 1a312bf into develop Mar 27, 2025
5 checks passed
@eliandoran eliandoran deleted the chore_dprint branch March 27, 2025 20:57
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.

2 participants