Skip to content

Auto-fix code quality problems #1

Auto-fix code quality problems

Auto-fix code quality problems #1

Workflow file for this run

name: Auto-fix code quality problems
on:
workflow_dispatch:
permissions:
contents: write
jobs:
lint:
name: Run linters
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 18
- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- name: Cache dependencies
uses: actions/cache@v5
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- name: Run ESLint
run: npx eslint --fix .
- name: Run Prettier
run: npx prettier --write .
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
message: Auto-fix code quality problems
author_name: ${{ github.actor }}
author_email: ${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com
committer_name: GitHub Actions
committer_email: 41898282+github-actions[bot]@users.noreply.github.com