Sha256: 06d1e1b856bc80d6bcb229a217fc543501b61a8c6a35afe4ee6c8db9a6967159
Contents?: true
Size: 645 Bytes
Versions: 30
Compression:
Stored size: 645 Bytes
Contents
# frozen_string_literal: true module ThemeCheck class DeprecatedFilter < LiquidCheck doc docs_url(__FILE__) category :liquid severity :suggestion def on_variable(node) used_filters = node.value.filters.map { |name, *_rest| name } used_filters.each do |filter| alternatives = ShopifyLiquid::DeprecatedFilter.alternatives(filter) next unless alternatives alternatives = alternatives.map { |alt| "`#{alt}`" } add_offense( "Deprecated filter `#{filter}`, consider using an alternative: #{alternatives.join(', ')}", node: node, ) end end end end
Version data entries
30 entries across 30 versions & 1 rubygems