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

feat: support xml #472

Merged
merged 5 commits into from
May 13, 2024
Merged

feat: support xml #472

merged 5 commits into from
May 13, 2024

Conversation

zanfee
Copy link
Contributor

@zanfee zanfee commented May 12, 2024

Description

Optional support for XML formatting based on @prettier/plugin-xml.

This is how it should work:

  • By default (even with formatters: true) XML support is disabled because it requires a separate dependency
  • XML support is enabled with formatters: { xml: true } or if @prettier/plugin-xml is installed as a dependency and formatters: true
  • Prettier options are extended by @prettier/plugin-xml specific rules
  • By default, XML formatting behaves similarly to HTML formatting (i.e. double quotes, no sorting of attributes)

Linked Issues

Fixes #460

Additional context

I have only tested XML support inside the @antfu/eslint-config repository itself.
Please feel free to suggest any changes.

Copy link

netlify bot commented May 12, 2024

Deploy Preview for melodious-froyo-4871f8 ready!

Name Link
🔨 Latest commit 0e19512
🔍 Latest deploy log https://app.netlify.com/sites/melodious-froyo-4871f8/deploys/66429a1f4bd41f000871d5ac
😎 Deploy Preview https://deploy-preview-472--melodious-froyo-4871f8.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

README.md Outdated
@@ -261,6 +263,7 @@ export default combine(
jsonc(),
yaml(),
toml(),
xml(),
Copy link
Owner

Choose a reason for hiding this comment

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

This is not true 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Damn, you're right :D it used to be true but then I changed it. Good catch.

@antfu antfu merged commit 19b4e39 into antfu:main May 13, 2024
8 checks passed
@zanfee zanfee deleted the feat/xml branch May 28, 2024 11:45
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.

XML formatter
2 participants