mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-06-21 12:55:17 +00:00
|
Some checks are pending
Docker Dev Branch Images Build / build (Dockerfile, lc-dev, node) (push) Waiting to run
Docker Dev Branch Images Build / build (Dockerfile.multi, lc-dev-api, api-build) (push) Waiting to run
GitNexus Index / index (push) Waiting to run
GitNexus Index / post-index (push) Blocked by required conditions
Adds a `Run Prettier --check on changed files` step to the existing `eslint-ci.yml` workflow. Same path filter (api/**, client/**, packages/**), same changed-files detection, runs after the ESLint step. ## Why Today there is no `prettier --check` in CI — only the local `lint-staged` pre-commit hook runs `prettier --write`. When a PR is merged with the hook bypassed (e.g. GitHub UI edit-and-merge, or `git commit --no-verify`), a file can land in a non-prettier-canonical state and nobody notices. The next contributor who stages an unrelated change in that file then ends up with a "drive-by" prettier diff in their PR. `packages/api/src` had 14 such files accumulated; #13281 fixes the existing drift. This PR closes the gap so it doesn't regrow. ## What the step does - Detects changed JS/TS files under `api/**`, `client/**`, or `packages/**` against the PR base. - Runs `npx prettier --check $CHANGED_FILES`. - On failure, prints a `::error::` annotation telling the contributor how to fix it locally (`npx prettier --write <files>`). Same one-step shape as the existing ESLint check — no extra workflow file, no extra `npm ci`, no extra checkout. ## Ordering note #13281 (`chore: prettier --write packages/api/src`) should land first so the existing drift is cleared. After both PRs merge, the pre-commit hook + this CI check together prevent drift from re-accumulating. ## Test plan - [x] `npx js-yaml .github/workflows/eslint-ci.yml` validates. - [ ] CI green on this PR itself (touches only `.github/workflows/`, which the path filter includes, so the workflow runs on itself). - [ ] After merge: a synthetic PR introducing prettier drift should fail the new step with the diagnostic message. |
||
|---|---|---|
| .. | ||
| a11y.yml | ||
| backend-review.yml | ||
| build.yml | ||
| cache-integration-tests.yml | ||
| client.yml | ||
| data-provider.yml | ||
| data-schemas.yml | ||
| deploy-dev.yml | ||
| deploy.yml | ||
| dev-branch-images.yml | ||
| dev-images.yml | ||
| dev-staging-images.yml | ||
| docker-smoke.yml | ||
| eslint-ci.yml | ||
| frontend-review.yml | ||
| generate_embeddings.yml | ||
| gitnexus-cleanup-pr.yml | ||
| gitnexus-deploy.yml | ||
| gitnexus-index.yml | ||
| gitnexus-pr-command.yml | ||
| helmcharts.yml | ||
| i18n-unused-keys.yml | ||
| locize-i18n-sync.yml | ||
| main-image-workflow.yml | ||
| tag-images.yml | ||
| unused-packages.yml | ||