diff --git a/.github/ISSUE_TEMPLATE/internal-issues-only.md b/.github/ISSUE_TEMPLATE/internal-issues-only.md index 5928cef..a14e8d8 100644 --- a/.github/ISSUE_TEMPLATE/internal-issues-only.md +++ b/.github/ISSUE_TEMPLATE/internal-issues-only.md @@ -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: - --- - - diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml index 59e5273..9b17673 100644 --- a/.github/workflows/format.yaml +++ b/.github/workflows/format.yaml @@ -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 . diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..301d47e --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +flake.lock diff --git a/flake.nix b/flake.nix index 737bbea..f0543ae 100644 --- a/flake.nix +++ b/flake.nix @@ -97,6 +97,7 @@ cargo-watch just + nodePackages.prettier ]; }; diff --git a/justfile b/justfile index b6fb3cf..00b4d1b 100644 --- a/justfile +++ b/justfile @@ -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