Refactor code structure for improved readability and maintainability.… #6
Workflow file for this run
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: Prevent npm lockfiles | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| guard: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Fail if npm lockfiles exist | |
| run: | | |
| set -e | |
| disallowed_files=$(find . -type f \( -name "package-lock.json" -o -name "npm-shrinkwrap.json" \) -not -path "./node_modules/*") | |
| if [ -n "$disallowed_files" ]; then | |
| echo "Disallowed npm lockfile(s) found. This repository uses Yarn only:" | |
| echo "$disallowed_files" | |
| exit 1 | |
| fi |