Skip to content

Commit

Permalink
Run Prettier on everything when formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamirTalwar committed Aug 5, 2024
1 parent 9120a82 commit f1b2be3
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 7 deletions.
10 changes: 4 additions & 6 deletions .github/ISSUE_TEMPLATE/internal-issues-only.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
---
name: New issues are meant to be created by Hasura collaborators only
about: DON'T USE THIS. We request you to use hasura/graphql-engine repo to open new
about:
DON'T USE THIS. We request you to use hasura/graphql-engine repo to open new
issues related to ndc-hub (bugs, feature requests etc). It's recommended to tag those
issues with label c/ddn-ndc-hub.
title: ''
labels: ''
title: ""
labels: ""
assignees:

---


28 changes: 27 additions & 1 deletion .github/workflows/format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,36 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: install tools
- name: install Rust tools
run: |
rustup show
- name: check formatting
run: |
cargo fmt --all --check
nixpkgs-fmt:
name: nixpkgs-fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: install Nix
uses: cachix/install-nix-action@V27

- name: check formatting
run: |
nix develop --command nixpkgs-fmt --check .
prettier:
name: prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: install Nix
uses: cachix/install-nix-action@V27

- name: check formatting
run: |
nix develop --command prettier --check .
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
flake.lock
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
cargo-watch

just
nodePackages.prettier
];
};

Expand Down
2 changes: 2 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ dev:
format:
cargo fmt --all
! command -v nix > /dev/null || nix fmt
! command -v prettier > /dev/null || prettier --write .

format-check:
cargo fmt --all --check
! command -v nix > /dev/null || nix fmt -- --check .
! command -v prettier > /dev/null || prettier --check .

lint:
cargo clippy --all-targets --all-features
Expand Down

0 comments on commit f1b2be3

Please sign in to comment.