-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
Is your feature request related to a problem? Please describe.
Currently, @shopify/prettier-plugin-liquid does not support prettier-ignore-start / prettier-ignore-end for range-based ignores. Only node-level {% # prettier-ignore %} comments are supported.
This makes it cumbersome to preserve intentional formatting or whitespace across larger sections of Liquid templates.
Describe the solution you'd like
Support standard Prettier range ignore comments:
<!-- prettier-ignore-start -->
<div class="custom-layout">
{{ some_variable | complicated_filter: foo: bar }}
{% render 'component', foo: bar %}
</div>
<!-- prettier-ignore-end -->or
{% comment %} prettier-ignore-start {% endcomment %}
<div class="custom-layout">
{{ some_variable | complicated_filter: foo: bar }}
{% render 'component', foo: bar %}
</div>
{% comment %} prettier-ignore-end {% endcomment %}Describe alternatives you've considered
- Using
{% # prettier-ignore %}before every node — works but is verbose and noisy. - Disabling formatting for the entire file via
.prettierignore— too coarse-grained.
Checklist
- I have checked and made sure that the proposal adheres to this plugin's principles
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.