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 =
{ "lucide" => "LucideIcon", "phosphor" => "PhosphorIcon", "heroicons" => "HeroIcon", "tabler" => "TablerIcon", "feather" => "FeatherIcon", "boxicons" => "BoxIcon", "flags" => "FlagIcon", "hugeicons" => "HugeIcon", "linear" => "LinearIcon", "radix" => "RadixIcon", "sidekickicons" => "SidekickIcon", "weather" => "WeatherIcon", "animated" => "AnimatedIcon" }.freeze