From db28c9fdd55920c19ab56170751be5853289272e Mon Sep 17 00:00:00 2001 From: Hans5958 Date: Thu, 15 Jan 2026 12:58:07 +0700 Subject: [PATCH 1/2] Fix lint issues --- src/content/rules/song-source-required.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. From 78a8dff50071837e957ae3f056d3f8070fe9c96a Mon Sep 17 00:00:00 2001 From: Hans5958 Date: Sun, 18 Jan 2026 00:06:36 +0700 Subject: [PATCH 2/2] Add auto-fix lint workflow --- .github/workflows/lint-fix.yml | 42 ++++++++++++++++++++++++++++++++++ .github/workflows/lint.yml | 3 +++ 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/lint-fix.yml 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: