Skip to content

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
MikeMcC399 added a commit to MikeMcC399/github-action that referenced this pull request Mar 18, 2025
@github-actions
Copy link

🎉 This PR is included in version 6.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants