Add check to prevent overriding any of the global objects
Bad:
{% assign article = ... %}
{% assign product = ... %}
{% assign collection = ... %}
etc. All the global objects in https://shopify.dev/docs/themes/liquid/reference/objects
We should not flag for product in ....
Although I agree with this, I believe it shouldn't be a flat no. I use assigns like this within block forloops. For example:
{% for block in section.blocks %}
{%- assign product = all_products[block.settings.product] -%}
{{ product.title }}
{% endfor %}
This allows for much more native coding within specific areas. In general templates then such a rule should absolutely be enforced, many an hour have I spent diagnosing why product details aren't rendering only to find some dirty app has re-assigned it.
Ah make sense in this case! Maybe just disallow it a the root instead?
closing as wont fix