Skip to main content

UnusedDocParam

The parameters defined within the doc tag must be used within the scope of the variable.


The following examples contain code snippets that either fail or pass this check.

The following example shows some_str LiquidDoc parameter not being used within the snippet:

snippets/snippet.liquid

{% doc %}
@param {string} some_str
@param {number} some_num
{% enddoc %}

{{ some_num }}

The following example shows valid uses of LiquidDoc parameters:

snippets/snippet.liquid

{% doc %}
@param {string} some_str
@param {number} some_num
@param {boolean} some_bool
{% enddoc %}

<div className="css-{{ some_str }}"></div>

{% if some_bool %}
{{ some_num | plus 5 }}
{% endif %}

The following example contains the default configuration for this check:

UnusedDocParam:
enabled: true
severity: warning
ParameterDescription
enabledWhether this check is enabled.
severityThe severity of the check.

Anchor to Disabling this checkDisabling this check

Disabling this check isn't recommended.


Was this page helpful?