-
Notifications
You must be signed in to change notification settings - Fork 97
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
prettier-ignore is ignored #59
Comments
`prettier-plugin-svelte` does not respect `prettier`s ignore rules (laid out [here](https://prettier.io/docs/en/ignore). There's an open issue for that: sveltejs/prettier-plugin-svelte#59 Until there's no way to not have `prettier` break the word into two, I'll chose the tradeoff to have the word broken in the wrong place for small phones.
This would be greatly appreciated..................... |
Implemented in 1.1.0. |
It is not working for me. I updated dependencies to
and this
still wraps. The prettier plugin seems to kick in since my Is anyone else having issues with this? |
Also not working for me. I need this line to be ignored because of unwanted spaces from the new lines.
|
This unfortunately doesn't work for me. But thanks for sharing Your settings. It must be caused by something different. |
I just had this issue when trying to inject a dynamic style tag and found this worked, no prettier-ignore required: {@html `<${'style'} class="block">
...
</style>`} My other issue was that postCSS was clobbering the style tag: hiding it in the nested string got around that. Without doing that results in Prettier doing this: {@html `<style class="block ✂prettier:content✂="LmFuaW1hdGlvbk5hbWUgewogI..."></style>`} |
Any progress or workaraound on that? Note that svelte files listed in |
In VS Code, using the "Svelte Beta" extension instead of the more popular "Svelte" extension from James Birtles (that uses this plugin's older 0.7.0 version), fixed at least the prettier-ignore feature in html for me. |
Didn't work for me. Do you mind sharing your VS Code settings? |
Really stabbing in the dark here... Cause I did some real wacky things in my process. Uninstall prettier and all svelte extension. > Installed prettier > installed old svelte > load svelte a file > uninstall old svelte extension > install Svelte Beta > reload vsCode. Not sure if this will work but it is how I had installed things. |
This issue is now about multiple things at once. The original issue, supporting The issues listed in the following have other, different reasons:
This is another symptom of #70
I created #131 for that |
|
#130 will fix this |
@dummdidumm Your example here does not work:
prettier still formats everything in this node... nothing I can do will prevent prettier from running in a svelte file on any line. I was attempting to do this to bypass #240 which still seems to be a bug. |
Please open a new issue with a detailed reproduction (can't reproduce this given your code snippet) instead of posting in 3 closed ones. |
The following snippet of code will get formatted regardless of whether the
<!-- prettier-ignore -->
comment is above the line. The standard prettier html parser handles this case.The spans need to stay on one line as this component is inside of a
<pre>
tag and being on new lines modifies the outcome. (That's a separate issue that can't necessarily be handled by #28, so theprettier-ignores
should be respected.)The text was updated successfully, but these errors were encountered: