Add more npm scripts. Version 1.0.2 #7
  
    
      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: Lint Codebase | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout the code from the repository | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| # Set up Node.js | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' | |
| # Cache npm modules | |
| - name: Cache node modules | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| # Install dependencies | |
| - name: Install dependencies | |
| run: npm ci | |
| # Run the linter | |
| - name: Run linter | |
| run: npm run lint |