Quote Convert
How quotation characters of markup attributes and Liquid tokens should be handled. Allows for conversion to single quotes or double quotes. Markup tag attributes should always use double quotations, it’s the standard in languages like HTML.
When working with Liquid, use
single
quotes for strings and always inferdouble
in the markup.
none
Below is an example of how this rule works if set to none
which is the default setting. No conversion of quotations is applied when using none
and one should consider setting a specific value.
- default
- recommended
- warrington
- strict
- prettier
{% if 'some-string' %}
{{ "string" | filter: 'string' }}
{% cycle 'one', 'two', "three", "four", 'five' %}
{% endif %}
{% if 'some-string' %}
{{ "string" | filter: 'string' }}
{% cycle 'one', 'two', "three", "four", 'five' %}
{% endif %}
double
Below is an example of how this rule works if set to double
which will go about converting and ensuring all markup quotations are using doubles.
- default
- recommended
- warrington
- strict
- prettier
{% if 'some-string' %}
{{ 'string' | filter: 'string' }}
{% cycle 'one', 'two', 'three', 'four', 'five' %}
{% endif %}
{% if 'some-string' %}
{{ "string" | filter: "string" }}
{% cycle "one", "two", "three", "four", "five" %}
{% endif %}
single
Below is an example of how this rule works if set to single
which will go about converting and ensuring all markup quotations are using singles.
- default
- recommended
- warrington
- strict
- prettier
{% if "some-string" %}
{{ "string" | filter: "string" }}
{% cycle "one", "two", "three", "four", "five" %}
{% endif %}
{% if "some-string" %}
{{ 'string' | filter: 'string' }}
{% cycle 'one', 'two', 'three', 'four', 'five' %}
{% endif %}