Code refactor #65
This file contains hidden or 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 Check | |
| # Trigger the workflow on all pushes and pull requests | |
| on: [push, pull_request] | |
| jobs: | |
| prettier-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| # Set up Node.js (needed for Prettier) | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: "16" | |
| # Install dependencies | |
| - name: Install dependencies | |
| run: npm install | |
| # Run Prettier to check code formatting | |
| - name: Run Prettier check | |
| run: npm run prettier:check | |
| # If the Prettier check fails, the job will fail |