fix(prettier-config): workaround for xml plugin issue#379
Conversation
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds a TypeScript parser override to the base Prettier config as a workaround for an XML plugin issue, bumps the pkg-size action version, and tidies up a workflow file.
- Introduce a
ts,tsxoverride inpackages/prettier-config/base.jsto force the TypeScript parser - Update
pkg-size/actionreference to v1.1.1 in the package‐size workflow - Remove/insert whitespace around workflow triggers in the publish workflow
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/prettier-config/base.js | Add override for TS parser to avoid XML plugin conflict |
| .github/workflows/pkg-size.yml | Bump pkg-size/action to v1.1.1 |
| .github/workflows/pkg-pr-new.yml | Adjust whitespace around the workflow’s on triggers |
Comments suppressed due to low confidence (3)
packages/prettier-config/base.js:79
- Consider adding a comment above this override to explain that it's a workaround for the XML plugin issue (e.g., reference the upstream issue #893) for future maintainers.
{
.github/workflows/pkg-size.yml:27
- [nitpick] To keep the workflow automatically up to date with patch releases, consider using the tag
pkg-size/action@v1.1.1instead of pinning to a specific commit SHA.
uses: pkg-size/action@a637fb0897b6f14f18e776d8c3dbccb34a1ad27b # v1.1.1
|
Caution Review failedThe pull request is closed. WalkthroughA patch update was documented for the Changes
Suggested labels
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
packages/prettier-config/base.jsOops! Something went wrong! :( ESLint: 9.29.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'typescript-eslint' imported from /eslint.config.js 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Signed-off-by: JounQin <admin@1stg.me>
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to 570d8d3 in 43 seconds. Click for details.
- Reviewed
38lines of code in3files - Skipped
0files when reviewing. - Skipped posting
3draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .github/workflows/pkg-pr-new.yml:2
- Draft comment:
Extra blank line added seems unnecessary. Remove if not intentional. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
2. .github/workflows/pkg-size.yml:27
- Draft comment:
Version comment updated to v1.1.1 but commit hash remains unchanged. Confirm that the intended version is referenced. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
3. packages/prettier-config/base.js:80
- Draft comment:
Explicit TS override added—consider adding an inline comment referencing the XML plugin issue for clarity. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
Workflow ID: wflow_mwrGykHyGj4cn17h
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
@1stg/app-config
@1stg/babel-preset
@1stg/browserslist-config
@1stg/commitlint-config
@1stg/common-config
@1stg/config
@1stg/eslint-config
@1stg/markuplint-config
@1stg/nano-staged
@1stg/postcss-config
@1stg/prettier-config
@1stg/remark-preset
@1stg/simple-git-hooks
@1stg/stylelint-config
@1stg/tsconfig
commit: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #379 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 39 39
Lines 273 273
Branches 126 126
======================================
Misses 273 273 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/prettier-config/base.js (1)
79-84: Extend override to all TS flavours for full coverageThe XML-plugin workaround targets
*.tsand*.tsx, but leaves out newer extensions (*.mts,*.cts,*.d.ts). If any of these exist, they will fall back to the XML plugin’s parser again.- files: ['**/*.{ts,tsx}'], + files: ['**/*.{ts,tsx,mts,cts,d.ts}'],This keeps the intent while future-proofing the config.
.changeset/stupid-beans-count.md (1)
1-6: Add context link to the changesetConsider referencing the upstream issue/PR to give consumers instant context:
fix: workaround for xml plugin issue + +See: https://github.com/prettier/plugin-xml/pull/893Helps maintainers trace the rationale later.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.changeset/stupid-beans-count.md(1 hunks).github/workflows/pkg-pr-new.yml(1 hunks).github/workflows/pkg-size.yml(1 hunks)packages/prettier-config/base.js(1 hunks)
🔇 Additional comments (2)
.github/workflows/pkg-pr-new.yml (1)
1-3: Whitespace tweak looks goodThe extra blank line after the workflow name is purely cosmetic and does not impact execution.
.github/workflows/pkg-size.yml (1)
27-27: Verify comment matches pinned commitThe comment now claims
v1.1.1, but the action is still pinned by SHA. Please double-check thata637fb0…27bis indeed thev1.1.1tag to avoid confusion.#!/bin/bash # Confirm the tag that contains the pinned commit git ls-remote https://github.com/pkg-size/action.git | grep a637fb0897b6f14f18e776d8c3dbccb34a1ad27b
prettier/plugin-xml#893
Important
Adds TypeScript parser override in Prettier config and updates GitHub Action version comment.
**/*.{ts,tsx}files inbase.jsto usetypescriptparser.pkg-size/actiontov1.1.1inpkg-size.yml.pkg-pr-new.ymlfor formatting consistency.This description was created by
for 570d8d3. You can customize this summary. It will automatically update as commits are pushed.
Summary by CodeRabbit