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

Improve dx fmt and add to treefmt #81

Closed
srid opened this issue Oct 9, 2023 · 0 comments
Closed

Improve dx fmt and add to treefmt #81

srid opened this issue Oct 9, 2023 · 0 comments

Comments

@srid
Copy link
Member

srid commented Oct 9, 2023

See https://dioxuslabs.com/blog/release-030#autoformatting

The dx fmt command in the dev shell of #79 can be used to format the render! HTML DSL functions, but it is pretty limited.

The PR's justfile defines just fmt like this:

# Auto-format the source tree
fmt:
    treefmt
    find src/app/ -name \*.rs | grep -v state.rs | xargs -n 1 dx fmt -f

Our goal here is to remove that line, so that just fmt runs nothing but treefmt.

To do this, two things need to happen:

  1. Open a PR on https://github.com/numtide/treefmt-nix adding the dioxus formatter. Use the leptos PR for reference: Add leptosfmt numtide/treefmt-nix#108
    • Note: Dioxus is available in nixpkgs, as pkgs.dioxus-cli
  2. Create corresponding PRs on the dioxus repo to improve integration with treefmt, just like we did with leptosfmt for the aforementioned PR
@srid srid mentioned this issue Oct 11, 2023
7 tasks
@divinenaman divinenaman self-assigned this Oct 15, 2023
@srid srid closed this as completed Sep 17, 2024
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

No branches or pull requests

2 participants