Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

docs(website): update formatter options #2389

Merged
merged 3 commits into from
Apr 27, 2022
Merged

docs(website): update formatter options #2389

merged 3 commits into from
Apr 27, 2022

Conversation

ematipico
Copy link
Contributor

Summary

Closes #2362

Test Plan

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Apr 11, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 33c0513
Status: ✅  Deploy successful!
Preview URL: https://2bf7fca8.tools-8rn.pages.dev

View logs

Copy link
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, how did you settle on --write over defaulting to writing and having a --lint or similar command?

@ematipico
Copy link
Contributor Author

ematipico commented Apr 13, 2022

Writing is a disruptive operation, regardless of what we write, and writing a file (especially in non-VCS projects) is always dangerous. We decided that the user should have intent overwriting files.

This is, for example, the same behaviour that prettier or clippy use. Once we will have VSC support for projects, --write can be alias for --allow-dirty, which it seems to be the standard option of allowing writing files when the current branch has uncommitted changes.

Rome classic had --allow-dirty for some commands, like rome init.

But at the moment we don't have knowledge of a project, so using what prettier does sounds reasonable.

@ematipico ematipico marked this pull request as ready for review April 22, 2022 15:03
@leops leops merged commit 3c55310 into main Apr 27, 2022
@leops leops deleted the release/0.5.0 branch April 27, 2022 12:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

☂️ Documentation changes 0.5.0
3 participants