-
Notifications
You must be signed in to change notification settings - Fork 107
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
feat: add prettier for content folder #1754
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I see that you requested my review on this. Is the PR ready and no longer in draft mode? |
Hi @rishi-raj-jain I just wanted you to take a look at this and hear you thoughts about comments issue, I described in description 🙏🏻 |
This reverts commit 5fbba48.
americano98
approved these changes
Jun 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds prettier config for content folder
Problems
Commets sctructure
Before
To comment out content in a markdown file we used JSX-style comments
This approach had a problem that we could see the commented code in the markdown preview, but allowed us to comment huge complicated blocks of code.
After
Unfortunately, Prettier escapes asterisks and formats JSX comments from
{/* ... */}
to{/\* ... \*/}
.It looks bad, provides build and eslint errors, and there is nothing we can do about it.
So now we're changing to the new comments structure:
This new approach allows to hide the commented code from the markdown preview, but has a big problem that we can't comment complicated blocks of codes.
We still can use JSX-style comments for the complicated blocks of codes, but in this case we should add the whole file to prettier ignore list at .prettierignore
Updated contribution guide
Steps to test
References
Preview