Skip to content

Commit cc2b49d

Browse files
committed
refactor: replace find command with fd for formatting JSON files
1 parent 5722fde commit cc2b49d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/check.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ jobs:
107107
- uses: actions/setup-node@v4
108108
- run: |
109109
npm install --global prettier;
110-
find . -name *.mod.json -exec npx prettier --write {} \;
111-
find . -name *.pkg.json -exec npx prettier --write {} \;
112-
git diff --exit-code;
110+
apt install fd-find
111+
fd moon.mod.json -x npx prettier --write {}
112+
fd moon.pkg.json -x npx prettier --write {}
113113
114114
check-typos:
115115
runs-on: ubuntu-latest

justfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
fmt-json:
2-
find . -name *.mod.json -exec npx prettier --write {} \;
3-
find . -name *.pkg.json -exec npx prettier --write {} \;
2+
fd moon.mod.json -x npx prettier --write {}
3+
fd moon.pkg.json -x npx prettier --write {}
44

0 commit comments

Comments
 (0)