chore(deps): bump the patch-and-minor group across 1 directory with 4 updates #74
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
| # .github/workflows/lint.yml | |
| name: Code Quality Checks (Lint & Format) | |
| on: | |
| pull_request: # Runs when a Pull Request is opened or updated | |
| branches: | |
| - main # Change 'main' to 'prod' if that's your base branch name | |
| push: | |
| branches: | |
| - main # Also runs on direct pushes to the main branch | |
| jobs: | |
| lint-and-format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: ⬇️ Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: 🛠️ Setup Node.js Environment | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| cache: 'npm' # Uses cache for faster dependency installation | |
| - name: 📦 Install Dependencies | |
| # This installs eslint and prettier, which you correctly added | |
| run: npm ci | |
| - name: 'Security Audit' | |
| run: npm audit --audit-level=high | |
| - name: 🔎 Run ESLint (JavaScript Linting) | |
| # Executes the script defined below | |
| run: npm run lint:js | |
| - name: 🎨 Run Prettier (Format Check) | |
| # Executes the script defined below. Fails the workflow if code is not formatted. | |
| run: npm run prettycheck |