Skip to content

wrong warning shown in prettierrc when "svelteSortOrder": "none" #2657

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

Closed
jangxyz opened this issue Jan 8, 2025 · 0 comments · Fixed by #2658
Closed

wrong warning shown in prettierrc when "svelteSortOrder": "none" #2657

jangxyz opened this issue Jan 8, 2025 · 0 comments · Fixed by #2658
Labels
bug Something isn't working

Comments

@jangxyz
Copy link
Contributor

jangxyz commented Jan 8, 2025

Describe the bug

VScode shows a wrong warning on .prettierrc file when you add a "svelteSortOrder" property with value "none".

Reproduction

sv create a fresh svelte project with prettier enabled, and add line "svelteSortOrder": "none" to .prettierrc file. It will render a yellow squiggly with the following message:

Value is not accepted. Valid values: "options-scripts-markup-styles", "options-scripts-styles-markup", "options-markup-scripts-styles", "options-markup-styles-scripts", "options-styles-scripts-markup", "options-styles-markup-scripts", "scripts-options-markup-styles", "scripts-options-styles-markup", "scripts-markup-options-styles", "scripts-markup-styles-options", "scripts-styles-options-markup", "scripts-styles-markup-options", "markup-options-scripts-styles", "markup-options-styles-scripts", "markup-scripts-options-styles", "markup-scripts-styles-options", "markup-styles-options-scripts", "markup-styles-scripts-options", "styles-options-scripts-markup", "styles-options-markup-scripts", "styles-scripts-options-markup", "styles-scripts-markup-options", "styles-markup-options-scripts", "styles-markup-scripts-options", "scripts-markup-styles", "scripts-styles-markup", "markup-styles-scripts", "markup-scripts-styles", "styles-markup-scripts", "styles-scripts-markup".

Expected behaviour

According to the docs on prettier-plugin-svelte#svelte-sort-order, it should be a valid value.

System Info

  • OS: macos
  • IDE: VSCode 1.95.2

Tested with svelte-vscode extension 109.5.1

Which package is the issue about?

Svelte for VS Code extension

Additional Information, eg. Screenshots

image
@jangxyz jangxyz added the bug Something isn't working label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant