-
Notifications
You must be signed in to change notification settings - Fork 314
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
Setup check format in pipeline #1001
Conversation
|
✅ Deploy Preview for solid-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
This is a reminder that Prettier does not format fenced code blocks inside JSX unless the following conditions are met:
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 |
@brenelz This PR has been inactive for a while. If you're busy, would you mind if I took it over? It's blocking some important changes. |
this isn't actually blocking any changes atm @amirhhashemi you're welcomed to assist (i'd assume @brenelz would be fine with the assist) just make sure he gets to give a review. |
@LadyBluenotes This is a blocker. Any sort of change or refactor is a huge pain to do because of the unformatted files. For example, I was thinking about changing the structure of the component prop docs in the API references and I decided not to do it before this merges, because I don't have the nerve to save a file and deal with the unintended changes. It's also going to be a huge problem when we wanted to migrate to the new site. |
@LadyBluenotes Sorry, I've never taken over a PR :) Should I create a new PR or somehow push my changes to this PR? |
Working within this one is good! |
I can't push my commits to this PR. Whether it's because I don't have the write permission to this repo or the OP has un-checked "Allow edits by maintainers". |
No, he has it checked. He has to add you to the branch itself, I guess. I reached out to ask if he could |
@amirhhashemi I think I invited you to collaborate on my solid-docs repo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went through all the MDX files and made sure they were formatted correctly to the best of my ability.
I added a "format" script that runs Prettier with the |
Should probably get this merged so we don't keep having to maintain it |
.github/workflows/static_checks.yml
Outdated
@@ -70,4 +70,4 @@ jobs: | |||
- name: ESLint check | |||
run: pnpm check:lint | |||
- name: Prettier check | |||
run: pnpm check:format | |||
run: pnpm format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the --write won't work in CI tho will it?
The CI won't actually write back to the github repo will it? |
You are right. In the latest commit, I used EDIT: I also created an |
setup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
cache: "pnpm" | ||
- run: pnpm i | ||
- uses: actions/cache/save@v4 | ||
with: | ||
path: | | ||
node_modules | ||
~/.pnpm-store | ||
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what's the goal in this job. It doesn't do anything useful that I can think of. So I removed it.
- uses: actions/cache/save@v4 | ||
with: | ||
path: | | ||
node_modules | ||
~/.pnpm-store | ||
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is needed to cache pnpm dependencies. See the official example.
Yeah I think it would be best to just close this with all the conflicts |
@LadyBluenotes Seriously? How formatting is not necessary in a big project? You guys don't format your files (as a proper editor does automatically) and only edit on the website? Conflicts are no reason to close this PR either. That's part of development, especially when a PR sits for two months. I fixed most of the problems a month ago and have been dealing with the conflicts since. It just needed someone to look at it for 15 minutes before the switch to SolidBase. Twice, my efforts to format this repository have been dismissed. It's such a basic problem that I can't believe my time has been wasted on it. I'm not sure I want to work on this project anymore. |
@amirhhashemi I can understand the frustration and I apologize for the miscommunication on this front. You are correct, we do still need formatting and I was unsure of whether it was easier for you to address this within this PR or if it would've been easier for you to do so in a new one. This wasn't closed with the intention of never addressing it, I was going to reach out tomorrow to have a conversation with you if you didn't happen to see this. |
Description(required)
Setup format files in CI
Run
pnpm exec prettier . --write
Related issues & labels