From 28f5fcf6d7b26f999a1b5c258c30dc564c39f77a Mon Sep 17 00:00:00 2001 From: hoakateo Date: Sat, 13 Jun 2026 22:44:54 +0700 Subject: [PATCH 01/13] ci: add lint.yml workflow for PR check --- .github/workflows/lint.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..b9d682a75 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,31 @@ +name: Lint Check + +on: + pull_request: + branches: [ master ] + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + name: Lint Check + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install Dependencies + run: npm ci + + - name: Run ESLint + run: npm run lint From 355a033e8314fb1fa136e3358ab32efaeeeea2ad Mon Sep 17 00:00:00 2001 From: hoakateo Date: Sat, 13 Jun 2026 22:57:41 +0700 Subject: [PATCH 02/13] ci: run eslint with max-warnings=0 --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b9d682a75..13cac7255 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -28,4 +28,4 @@ jobs: run: npm ci - name: Run ESLint - run: npm run lint + run: npx eslint . --max-warnings=0 From b56f514160951eaf9ba9c19da975a94c37547490 Mon Sep 17 00:00:00 2001 From: 7ui77 <99854073+7ui77@users.noreply.github.com> Date: Sat, 13 Jun 2026 23:15:38 +0700 Subject: [PATCH 03/13] Update lint.yml --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 13cac7255..b9d682a75 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -28,4 +28,4 @@ jobs: run: npm ci - name: Run ESLint - run: npx eslint . --max-warnings=0 + run: npm run lint From f537c8f70d0c2833fbbcd5fb97139564df507d37 Mon Sep 17 00:00:00 2001 From: 7ui77 <99854073+7ui77@users.noreply.github.com> Date: Sat, 13 Jun 2026 23:24:38 +0700 Subject: [PATCH 04/13] Update lint.yml --- .github/workflows/lint.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b9d682a75..4f1620bcc 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,6 +14,11 @@ jobs: name: Lint Check runs-on: ubuntu-latest + # BẮT BUỘC: Cấp quyền cho secrets.GITHUB_TOKEN để viết bình luận vào PR + permissions: + contents: read + pull-requests: write + steps: - name: Checkout Repository uses: actions/checkout@v4 @@ -27,5 +32,16 @@ jobs: - name: Install Dependencies run: npm ci - - name: Run ESLint - run: npm run lint + # Thay vì chạy 'npm run lint', ta dùng reviewdog để chạy eslint + - name: Run ESLint with Reviewdog + uses: reviewdog/action-eslint@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + # Đưa bình luận vào luồng thảo luận chính (Conversation tab) + reporter: github-pr-review + # Chạy eslint trên toàn bộ project (tương đương lệnh của bạn) + eslint_flags: "." + # Giữ là 'false' để nếu chỉ có WARNING thì GitHub vẫn hiện TÍCH XANH (Pass) + # Nếu muốn WARNING cũng làm X ĐỎ (Fail) thì đổi thành 'true' + fail_on_error: false + From 6f407a880f9d2fba04aca18dfaca13a6cbedab57 Mon Sep 17 00:00:00 2001 From: 7ui77 <99854073+7ui77@users.noreply.github.com> Date: Sat, 13 Jun 2026 23:37:24 +0700 Subject: [PATCH 05/13] Add language property to TruyenSS plugin --- plugins/vietnamese/truyenss.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/vietnamese/truyenss.ts b/plugins/vietnamese/truyenss.ts index e9415ff75..391ecba63 100644 --- a/plugins/vietnamese/truyenss.ts +++ b/plugins/vietnamese/truyenss.ts @@ -13,6 +13,7 @@ class TruyenSS implements Plugin.PluginBase { icon = 'src/vi/truyenss/icon.png'; site = 'https://truyenss.com'; version = '1.0.0'; + lang ="" ; imageRequestInit: Plugin.ImageRequestInit = { headers: { Referer: this.site + '/' }, From 728ced90aeeac6bc10d25a518e7da722e5c811a8 Mon Sep 17 00:00:00 2001 From: hoakateo Date: Sat, 13 Jun 2026 23:46:36 +0700 Subject: [PATCH 06/13] ci: add manual check step for eslint raw output --- .github/workflows/lint.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4f1620bcc..32bf77837 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -32,6 +32,10 @@ jobs: - name: Install Dependencies run: npm ci + # BƯỚC KIỂM TRA THỦ CÔNG: Xem lệnh gốc của bạn có thực sự tìm ra lỗi không + - name: Check ESLint Raw Output + run: npm run lint + # Thay vì chạy 'npm run lint', ta dùng reviewdog để chạy eslint - name: Run ESLint with Reviewdog uses: reviewdog/action-eslint@v1 From 9153169c2f4574cc071f71dd571a08dd411c95bf Mon Sep 17 00:00:00 2001 From: 7ui77 <99854073+7ui77@users.noreply.github.com> Date: Sat, 13 Jun 2026 23:48:34 +0700 Subject: [PATCH 07/13] Update truyenss.ts --- plugins/vietnamese/truyenss.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/vietnamese/truyenss.ts b/plugins/vietnamese/truyenss.ts index 391ecba63..e9415ff75 100644 --- a/plugins/vietnamese/truyenss.ts +++ b/plugins/vietnamese/truyenss.ts @@ -13,7 +13,6 @@ class TruyenSS implements Plugin.PluginBase { icon = 'src/vi/truyenss/icon.png'; site = 'https://truyenss.com'; version = '1.0.0'; - lang ="" ; imageRequestInit: Plugin.ImageRequestInit = { headers: { Referer: this.site + '/' }, From 24916b470d16b844b68e11c614bce2ff7f63d2d6 Mon Sep 17 00:00:00 2001 From: hoakateo Date: Sat, 13 Jun 2026 23:54:25 +0700 Subject: [PATCH 08/13] test: introduce lint error to verify CI failure --- plugins/vietnamese/lightnovelvn.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/vietnamese/lightnovelvn.ts b/plugins/vietnamese/lightnovelvn.ts index 37a4d07d4..c2e606bb8 100644 --- a/plugins/vietnamese/lightnovelvn.ts +++ b/plugins/vietnamese/lightnovelvn.ts @@ -4,6 +4,8 @@ import { Plugin } from '@/types/plugin'; import { Filters } from '@libs/filterInputs'; import { NovelStatus } from '@libs/novelStatus'; +console.log(nonexistentVariable); + type SearchedNovel = { name: string; slug: string; From cf6374fdfe63d0f20be9a25802bef8c03597d84c Mon Sep 17 00:00:00 2001 From: 7ui77 <99854073+7ui77@users.noreply.github.com> Date: Sun, 14 Jun 2026 00:03:01 +0700 Subject: [PATCH 09/13] Update lightnovelvn.ts --- plugins/vietnamese/lightnovelvn.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/vietnamese/lightnovelvn.ts b/plugins/vietnamese/lightnovelvn.ts index c2e606bb8..37a4d07d4 100644 --- a/plugins/vietnamese/lightnovelvn.ts +++ b/plugins/vietnamese/lightnovelvn.ts @@ -4,8 +4,6 @@ import { Plugin } from '@/types/plugin'; import { Filters } from '@libs/filterInputs'; import { NovelStatus } from '@libs/novelStatus'; -console.log(nonexistentVariable); - type SearchedNovel = { name: string; slug: string; From 053d0a8a4d22df135e6a5a9beae1da0c265d59dc Mon Sep 17 00:00:00 2001 From: hoakateo Date: Sun, 14 Jun 2026 00:16:09 +0700 Subject: [PATCH 10/13] ci: remove Check ESLint Raw Output step --- .github/workflows/lint.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 32bf77837..54f740b92 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -31,11 +31,6 @@ jobs: - name: Install Dependencies run: npm ci - - # BƯỚC KIỂM TRA THỦ CÔNG: Xem lệnh gốc của bạn có thực sự tìm ra lỗi không - - name: Check ESLint Raw Output - run: npm run lint - # Thay vì chạy 'npm run lint', ta dùng reviewdog để chạy eslint - name: Run ESLint with Reviewdog uses: reviewdog/action-eslint@v1 From b34f9dbf01725706c06265b132029a8d1aeb256c Mon Sep 17 00:00:00 2001 From: 7ui77 <99854073+7ui77@users.noreply.github.com> Date: Mon, 15 Jun 2026 16:29:44 +0700 Subject: [PATCH 11/13] Configure Reviewdog for ESLint in lint.yml Updated lint.yml to configure Reviewdog for ESLint and adjusted permissions. --- .github/workflows/lint.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 54f740b92..0f457a88b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,7 +14,6 @@ jobs: name: Lint Check runs-on: ubuntu-latest - # BẮT BUỘC: Cấp quyền cho secrets.GITHUB_TOKEN để viết bình luận vào PR permissions: contents: read pull-requests: write @@ -31,16 +30,11 @@ jobs: - name: Install Dependencies run: npm ci - # Thay vì chạy 'npm run lint', ta dùng reviewdog để chạy eslint - name: Run ESLint with Reviewdog uses: reviewdog/action-eslint@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} - # Đưa bình luận vào luồng thảo luận chính (Conversation tab) reporter: github-pr-review - # Chạy eslint trên toàn bộ project (tương đương lệnh của bạn) eslint_flags: "." - # Giữ là 'false' để nếu chỉ có WARNING thì GitHub vẫn hiện TÍCH XANH (Pass) - # Nếu muốn WARNING cũng làm X ĐỎ (Fail) thì đổi thành 'true' fail_on_error: false From cc4709613cbd5805737bbf203013c0b350689a23 Mon Sep 17 00:00:00 2001 From: 7ui77 <99854073+7ui77@users.noreply.github.com> Date: Mon, 15 Jun 2026 19:42:20 +0700 Subject: [PATCH 12/13] Update lint workflow to handle changed files --- .github/workflows/lint.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0f457a88b..654841bf7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -21,20 +21,33 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Get Changed Files + id: changed-files + uses: tj-actions/changed-files@v45 + with: + files: | + **/*.{js,jsx,ts,tsx} - name: Setup Node.js + if: steps.changed-files.outputs.any_changed == 'true' uses: actions/setup-node@v4 with: node-version: '20' cache: 'npm' - name: Install Dependencies + if: steps.changed-files.outputs.any_changed == 'true' run: npm ci + - name: Run ESLint with Reviewdog + if: steps.changed-files.outputs.any_changed == 'true' uses: reviewdog/action-eslint@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} reporter: github-pr-review - eslint_flags: "." - fail_on_error: false + eslint_flags: "${{ steps.changed-files.outputs.all_changed_files }}" + fail_on_error: false From c60d5bbe6d02f0538218ade2c8ee623402e37881 Mon Sep 17 00:00:00 2001 From: 7ui77 <99854073+7ui77@users.noreply.github.com> Date: Mon, 15 Jun 2026 19:54:48 +0700 Subject: [PATCH 13/13] Update lint workflow to include filter mode --- .github/workflows/lint.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 654841bf7..ba3f5077b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -27,9 +27,6 @@ jobs: - name: Get Changed Files id: changed-files uses: tj-actions/changed-files@v45 - with: - files: | - **/*.{js,jsx,ts,tsx} - name: Setup Node.js if: steps.changed-files.outputs.any_changed == 'true' @@ -49,5 +46,6 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} reporter: github-pr-review eslint_flags: "${{ steps.changed-files.outputs.all_changed_files }}" + filter_mode: diff_context fail_on_error: false