refactor: prep for Turborepo #107
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
| # GitHub Action: Lint JavaScript code | |
| # | |
| # This workflow lints the JavaScript code in the repository. | |
| # | |
| # Maintainer: Matt Norris <matnorri@cisco.com> | |
| # | |
| # Usage: | |
| # - Lints the JavaScript code in the repository. | |
| # - Fails the workflow if any linting issues are found. | |
| # | |
| # For more information on ESLint, see: https://eslint.org/ | |
| # For more information on Prettier, see: https://prettier.io/ | |
| name: Lint JavaScript | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| types: [opened, reopened, synchronize] | |
| paths: | |
| - 'packages/javascript/**/*.js' | |
| - 'packages/javascript/**/*.json' | |
| - '.github/workflows/lint.yml' | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: packages/javascript | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'npm' | |
| cache-dependency-path: packages/javascript/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run ESLint | |
| run: npm run lint:eslint | |
| - name: Run Prettier | |
| run: npm run lint:prettier |