Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

ci: eslint annotation (#31056)

Stephen Zhou1a2fce705583
diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml
index 6c5d6f41350..b96db5a390e 100644
--- a/.github/workflows/style.yml
+++ b/.github/workflows/style.yml
@@ -65,6 +65,9 @@ jobs:
defaults:
run:
working-directory: ./web
+ permissions:
+ checks: write
+ pull-requests: read
steps:
- name: Checkout code
@@ -103,7 +106,15 @@ jobs:
if: steps.changed-files.outputs.any_changed == 'true'
working-directory: ./web
run: |
- pnpm run lint
+ pnpm run lint:report
+ continue-on-error: true
+
+ - name: Annotate Code
+ if: steps.changed-files.outputs.any_changed == 'true'
+ uses: DerLev/eslint-annotations@51347b3a0abfb503fc8734d5ae31c4b151297fae
+ with:
+ eslint-report: web/eslint_report.json
+ github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Web type check
if: steps.changed-files.outputs.any_changed == 'true'
diff --git a/web/package.json b/web/package.json
index 000862204b9..5ca90c75ea1 100644
--- a/web/package.json
+++ b/web/package.json
@@ -28,9 +28,10 @@
"build:docker": "next build && node scripts/optimize-standalone.js",
"start": "node ./scripts/copy-and-start.mjs",
"lint": "eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache",
- "lint:fix": "eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache --fix",
- "lint:quiet": "eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache --quiet",
- "lint:complexity": "eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache --rule 'complexity: [error, {max: 15}]' --quiet",
+ "lint:fix": "pnpm lint --fix",
+ "lint:quiet": "pnpm lint --quiet",
+ "lint:complexity": "pnpm lint --rule 'complexity: [error, {max: 15}]' --quiet",
+ "lint:report": "pnpm lint --output-file eslint_report.json --format json",
"type-check": "tsc --noEmit",
"type-check:tsgo": "tsgo --noEmit",
"prepare": "cd ../ && node -e \"if (process.env.NODE_ENV !== 'production'){process.exit(1)} \" || husky ./web/.husky",