Module: RuboCop::Cop::Glyphs::LibraryCallHelpers

Included in:
LegacyIconHelper, PreferLibraryComponent
Defined in:
lib/rubocop/cop/glyphs/library_call_helpers.rb

Overview

Shared logic for cops that rewrite icon calls: locating a literal library:/from: pair, mapping libraries to Glyphs components, and removing the pair without leaving dangling commas.

Constant Summary collapse

LIBRARY_KEYS =
%i[library from].freeze
LIBRARY_TO_COMPONENT =

Library name string => component name, keyed by the icons-gem library name ("lucide"). Derived from the canonical map in Glyphs::IconReference so the cops and the icon pruner never drift.

::Glyphs::IconReference::LIBRARY_TO_COMPONENT.transform_keys(&:to_s).freeze