diff --git a/.github/workflows/lint-fix.yml b/.github/workflows/lint-fix.yml new file mode 100644 index 0000000..6d0c0be --- /dev/null +++ b/.github/workflows/lint-fix.yml @@ -0,0 +1,42 @@ +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 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 494cd99..803433d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,6 +2,9 @@ name: Check code quality on: push: pull_request: + workflow_dispatch: +permissions: + contents: read jobs: lint: diff --git a/src/content/rules/song-source-required.mdx b/src/content/rules/song-source-required.mdx index 982823d..64decc6 100644 --- a/src/content/rules/song-source-required.mdx +++ b/src/content/rules/song-source-required.mdx @@ -20,4 +20,4 @@ automatically_fixed: "False" complete_validation: "True" --- -Song entries require a PV *or* an external link *or* an attached album entry for proof of existence. A description may be set instead if the only applicable links are direct downloads or profile-less file sharing sites. +Song entries require a PV _or_ an external link _or_ an attached album entry for proof of existence. A description may be set instead if the only applicable links are direct downloads or profile-less file sharing sites.