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

test: add jsx linting #1397

Merged
merged 2 commits into from
Mar 11, 2025

Conversation

MikeMcC399
Copy link
Collaborator

@MikeMcC399 MikeMcC399 commented Mar 10, 2025

Situation

  • React *.jsx files are not currently linted. With the exception of the two Stepper*.jsx files in examples/component-tests/src/components however, all other *.jsx source files are scaffolded by npm create vite and should not be linted since the content is externally provided.

Assessment

Change

For the .prettierignore file:

  • Add *.jsx as an exception
  • Allow examples/component-tests/src/components/*.jsx

Run the following to correct style of examples/component-tests/src/components/*.jsx files:

npx prettier **/*.jsx --write

Verification

On Ubuntu 24.04.2 LTS, Node.js 22.14.0 LTS

git clean -xfd
npm ci
npx prettier **/*.jsx --check

and confirm the response is:

Checking formatting...
All matched files use Prettier code style!

@MikeMcC399 MikeMcC399 self-assigned this Mar 10, 2025
@cypress-app-bot
Copy link

@MikeMcC399 MikeMcC399 marked this pull request as ready for review March 10, 2025 15:21
@jennifer-shehane jennifer-shehane merged commit 6bc6051 into cypress-io:master Mar 11, 2025
74 checks passed
@MikeMcC399 MikeMcC399 deleted the jsx-prettier-linting branch March 11, 2025 14:11
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