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

WIP: Setup check format in pipeline #1001

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

brenelz
Copy link
Collaborator

@brenelz brenelz commented Jan 3, 2025

  • I have read the Contribution guide
  • This PR references an issue (except for typos, broken links, or other minor problems)

Description(required)

Setup format files in CI
Run pnpm exec prettier . --write

Related issues & labels

Copy link

stackblitz bot commented Jan 3, 2025

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

netlify bot commented Jan 3, 2025

Deploy Preview for solid-docs failed. Why did it fail? →

Name Link
🔨 Latest commit a4cbf0a
🔍 Latest deploy log https://app.netlify.com/sites/solid-docs/deploys/67772bf91ca1b000087b3757

@amirhhashemi
Copy link
Contributor

amirhhashemi commented Jan 3, 2025

This is a reminder that Prettier does not format fenced code blocks inside JSX unless the following conditions are met:

  1. There is a blank line at the top and bottom of the block.
  2. The block starts at the beginning of the line (with no indentation).

For example, Prettier does not recognize the fenced code block in this code:

<TabsCodeBlocks>
  <div id="npm">
    ```bash frame="none"
    npm install @macaron-css/core @macaron-css/solid
    ```
  </div>
</TabsCodeBlocks>

As a result, it formats it incorrectly like this:

<TabsCodeBlocks>
  <div id="npm">
    ```bash frame="none" npm install @macaron-css/core @macaron-css/solid ```
  </div>
</TabsCodeBlocks>

To resolve this issue, you need to manually check all fenced code blocks and ensure they meet the criteria mentioned above:

<TabsCodeBlocks>
<div id="npm">

```bash frame="none"
npm install @macaron-css/core @macaron-css/solid
```

</div>
</TabsCodeBlocks>

I have already addressed this in my own pull request, specifically in this commit. If you find it helpful, you can use git cherry-pick to incorporate it.

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.

[Other]: Unformatted files
2 participants