mirror of
https://github.com/langgenius/dify.git
synced 2026-02-24 18:05:11 +00:00
ci: eslint annotation (#31056)
This commit is contained in:
13
.github/workflows/style.yml
vendored
13
.github/workflows/style.yml
vendored
@@ -65,6 +65,9 @@ jobs:
|
|||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: ./web
|
working-directory: ./web
|
||||||
|
permissions:
|
||||||
|
checks: write
|
||||||
|
pull-requests: read
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@@ -103,7 +106,15 @@ jobs:
|
|||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
working-directory: ./web
|
working-directory: ./web
|
||||||
run: |
|
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
|
- name: Web type check
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
|
|||||||
@@ -28,9 +28,10 @@
|
|||||||
"build:docker": "next build && node scripts/optimize-standalone.js",
|
"build:docker": "next build && node scripts/optimize-standalone.js",
|
||||||
"start": "node ./scripts/copy-and-start.mjs",
|
"start": "node ./scripts/copy-and-start.mjs",
|
||||||
"lint": "eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache",
|
"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:fix": "pnpm lint --fix",
|
||||||
"lint:quiet": "eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache --quiet",
|
"lint:quiet": "pnpm lint --quiet",
|
||||||
"lint:complexity": "eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache --rule 'complexity: [error, {max: 15}]' --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": "tsc --noEmit",
|
||||||
"type-check:tsgo": "tsgo --noEmit",
|
"type-check:tsgo": "tsgo --noEmit",
|
||||||
"prepare": "cd ../ && node -e \"if (process.env.NODE_ENV !== 'production'){process.exit(1)} \" || husky ./web/.husky",
|
"prepare": "cd ../ && node -e \"if (process.env.NODE_ENV !== 'production'){process.exit(1)} \" || husky ./web/.husky",
|
||||||
|
|||||||
Reference in New Issue
Block a user