From e963cb9bae0fcee43397183a23e3a62391bb522c Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Fri, 7 Mar 2025 19:24:30 +0800 Subject: [PATCH] Add "Autofix" action (#15749) --- .github/workflows/autofix.yml | 18 ++++++++++++++++++ package.json | 4 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/autofix.yml diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml new file mode 100644 index 000000000..8e4b2114f --- /dev/null +++ b/.github/workflows/autofix.yml @@ -0,0 +1,18 @@ +name: autofix.ci # needed to securely identify the workflow + +on: + pull_request: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + fix: + name: Run automated fix + uses: prettier/shared-workflows/.github/workflows/automated-fix.yml@main + with: + repository: prettier/prettier diff --git a/package.json b/package.json index 0ca15a7e6..22cf7a72e 100644 --- a/package.json +++ b/package.json @@ -166,7 +166,7 @@ "perf:inspect": "yarn && yarn build && cross-env NODE_ENV=production node --inspect-brk ./dist/bin/prettier.cjs", "perf:benchmark": "yarn perf --debug-benchmark", "perf:compare": "./scripts/benchmark/compare.sh", - "lint": "run-p \"lint:*\"", + "lint": "run-p --continue-on-error \"lint:*\"", "lint:typecheck": "tsc", "lint:eslint": "cross-env EFF_NO_LINK_RULES=true eslint . --format friendly", "lint:changelog": "node ./scripts/lint-changelog.js", @@ -175,7 +175,7 @@ "lint:deps": "node ./scripts/check-deps.js", "lint:knip": "knip", "lint:format-test": "node ./scripts/format-test-lint.js", - "fix": "run-s fix:eslint fix:prettier", + "fix": "run-s --continue-on-error fix:eslint fix:prettier", "fix:eslint": "yarn lint:eslint --fix", "fix:prettier": "yarn lint:prettier --write", "build": "node ./scripts/build/build.js",