Skip to content

Commit

Permalink
workaround to only install prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
nl32 committed Apr 24, 2024
1 parent 7f6c7f0 commit c9ee951
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/generateCheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ else
echo "### Files with bad formatting:" >>$GITHUB_STEP_SUMMARY
for file in $files; do
echo "- $file" >>$GITHUB_STEP_SUMMARY
echo "::error file=$file::$file Not Formatted correctly"
echo "::error file=$file::$file not formatted correctly"
done
exit 1
fi
12 changes: 8 additions & 4 deletions .github/workflows/prettierCheck.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Prettier Formatting Check
name: Formatting Check
run-name: Running formatting check
on: [push]
jobs:
Expand All @@ -10,11 +10,15 @@ jobs:
with:
node-version: 18
cache: 'npm'
- run: npm ci
- name: Prettier check
- name: Run npm install
run: |
mv package.json package.json.bak
npm i --no-save prettier prettier-plugin-tailwindcss
mv package.json.bak package.json
- name: Run prettier
run: |
files=`npx prettier . -l` || st=$?
echo status=`echo $st`>>"$GITHUB_ENV"
echo files=`echo $files`>> "$GITHUB_ENV"
- name: generate github check message
- name: generate errors/summary
run: .github/workflows/generateCheck.sh
2 changes: 0 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,3 @@ export default function RootLayout({
</html>
);
}


0 comments on commit c9ee951

Please sign in to comment.