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

fix: code block with incorrect language #5896

Merged
merged 2 commits into from
Aug 16, 2024

Conversation

sumimakito
Copy link
Contributor

According to the context, the below code block should be for a JSON file. However, it is rendered as cypress.config.js/ts:

Screenshot 2024-08-16 at 14 44 28

Copy link

netlify bot commented Aug 16, 2024

👷 Deploy request for cypress-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit afe58a1

@CLAassistant
Copy link

CLAassistant commented Aug 16, 2024

CLA assistant check
All committers have signed the CLA.

@cypress-app-bot
Copy link
Collaborator

@MikeMcC399
Copy link
Contributor

@sumimakito

There is special pre-processing used on this page and your change fails formatting checks, so I suspect that it may not be necessary to change. You could check how :::cypress-config-example is supposed to work.

@sumimakito
Copy link
Contributor Author

Hi @MikeMcC399, thanks for responding. It turned out that it was caused by the incorrect format in the JSON code block (unquoted keys and single quotes around values). I've fixed the issue and updated the PR.

From the documentation, :::cypress-config-example directive wraps a JavaScript object with defineConfig(...) and marks it as a default export, but in this PR, I was intended to render the JSON configuration with a proper JSON code block instead of a JavaScript/TypeScript block rendered by the :::cypress-config-example directive.

@MikeMcC399
Copy link
Contributor

@sumimakito

I understand now that you are correcting an issue in https://docs.cypress.io/guides/tooling/reporters#Command-line-3 which is supposed to display an example reporter-config.json and this example was wrongly generated / formatted. Sorry for my misunderstanding!

@sumimakito
Copy link
Contributor Author

@MikeMcC399 No problem. Thanks for helping check the CI results anyway!

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sumimakito Thanks for the fix!

@jennifer-shehane jennifer-shehane merged commit 05920d3 into cypress-io:main Aug 16, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants