UnusedDocParam
The parameters defined within the doc
tag must be used within the scope of the variable.
Anchor to ExamplesExamples
The following examples contain code snippets that either fail or pass this check.
Anchor to ✗ Fail✗ Fail
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 }}
Anchor to ✓ Pass✓ Pass
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 %}
Anchor to OptionsOptions
The following example contains the default configuration for this check:
UnusedDocParam
enabledtrue
severity warning
Parameter | Description |
---|---|
enabled | Whether this check is enabled. |
severity | The severity of the check. |
Anchor to Disabling this checkDisabling this check
Disabling this check isn't recommended.
Was this page helpful?