Update Contributor Section Layout and Display (#922) #1846
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Prettier Code Formatting | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
branches: | |
- main | |
- develop | |
jobs: | |
prettier-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
- name: Install dependencies | |
run: npm install | |
- name: Run prettier | |
run: | | |
npx prettier --check . | |
prettier_exit_code=$? | |
if [ $prettier_exit_code -ne 0 ]; then | |
echo "Prettier check failed. Please run 'npx prettier --write .' to fix formatting issues." | |
exit 1 | |
fi |