-
Notifications
You must be signed in to change notification settings - Fork 394
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
Clear prettier error with prettier-ignore
comment
#3330
Conversation
julieg18
commented
Mar 3, 2022
•
edited
Loading
edited
- stops prettier from incorrectly formatting line in docs/command-ref/repro (Restyle status: misc updates #3313)
* stop prettier from incorrectly formatting line in command-ref/repro
@@ -51,6 +51,7 @@ There are a few ways to restrict what will be regenerated by this command: by | |||
specifying specific reproduction [`targets`](#options), or by using certain | |||
command [options](#options), such as `--single-item` or `--all-pipelines`. | |||
|
|||
<!-- prettier-ignore --> | |||
> Note that stages without dependencies nor outputs are considered [always |
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.
If we don't add a comment, prettier adds a >
at the end of line 55.
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.
Looks good to me.
This unique issue seems to happen when the bracketed link falls on line wrap. So, I don't see a way to fix this on a prettier config.
Changing proseWrap would affect other.
Hmm. Restyle is using prettier also. pre-commit and Restyle must be consistent. If they are not- that'a a bug to my mind. Or am I missing something? We've never so far had to add prettier-ignore as far as I remember. |
They are. Prettier on the pre-commit hook tries to do the same. I had to |
Is that somehow valid or should we maybe report the issue to https://github.com/prettier/prettier ? |
p.s. we only have one more around a YAML block in https://raw.githubusercontent.com/iterative/dvc.org/master/content/docs/user-guide/project-structure/pipelines-files.md |
Then I might be missing the problem. Could you give me some context? If they are consistent we should never see Retyled PRs if pre-commit got applied, right? |
Correct. Full context:
|
Thanks, Jorge. Okay, I see they are aligned and both of them have the same bug. Have we raised the bug in the prettier repo to track? Also, can we put a comment with a link to this discussion somewhere nearby the ignore pragma? |
Looks like there is already an issue opened! There is also a pr opened for it already as well :) |
Great. I subscribed to the issue for now. |
The PR's been open since Sept 2020 (prettier/prettier#9125) so prob not being merged soon. |
* stop prettier from incorrectly formatting line in command-ref/repro