name: ESLint on: [push] jobs: eslint: name: Run ESLint runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install Node.js uses: actions/setup-node@v1 with: node-version: 16.13.1 - name: Cache directory path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - uses: actions/cache@v1 id: yarn-cache with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - name: Install dependencies run: | yarn install - name: Run eslint run: | ./node_modules/eslint/bin/eslint.js "app/javascript/**/*.js"