Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: exclude prettier checks on generated content #1398

Merged

Conversation

MikeMcC399
Copy link
Collaborator

Issue

Prettier should not be applied to content created by builds or sourced externally.

Builds

Each of the following examples includes a build script definition which, if run, generates additional files:

The dist directory also contains only generated files.

External sources

Generated by ncc through npm run build

Scaffolded by Cypress:

Scaffolded by npm create vite:

Change

Add to .prettierignore for:

  • examples/component-tests/cypress
  • examples/component-tests/dist
  • examples/component-tests/src/*.jsx
  • examples/component-tests/index.html
  • examples/nextjs/.next
  • examples/wait-on-vite/dist
  • examples/wait-on-vite/index.html
  • dist

Verification

Ubuntu 24.04.2 LTS, Node.js 22.14.0 LTS

git clean -xfd
npm ci
cd examples/component-tests
npm ci
npm run build
cd ../nextjs
npm ci
npm run build
cd ../wait-on-vite
npm ci
npm run build
cd ../..
npx prettier . --check

@MikeMcC399 MikeMcC399 added the ci label Mar 11, 2025
@MikeMcC399 MikeMcC399 self-assigned this Mar 11, 2025
@cypress-app-bot
Copy link

@MikeMcC399 MikeMcC399 marked this pull request as ready for review March 11, 2025 14:45
@jennifer-shehane jennifer-shehane merged commit a84cb0a into cypress-io:master Mar 11, 2025
76 checks passed
@MikeMcC399 MikeMcC399 deleted the prettier-exclude-generated branch March 11, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants