Skip to content

Commit

Permalink
refactor: simplify constants in deprecated icons codemod
Browse files Browse the repository at this point in the history
  • Loading branch information
Martí Malek committed Aug 28, 2023
1 parent c025d34 commit 3af6bc6
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions src/codemods/deprecated-icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,7 @@ const DeprecatedToValidIconsMap = {
XIcon: 'CloseIcon'
};

const DeprecatedIconsNames = [
'BackwardSmallIcon',
'ChevronDownSmallIcon',
'ChevronLeftSmallIcon',
'ChevronRightSmallIcon',
'ChevronUpSmallIcon',
'DownloadSmallIcon',
'ForwardSmallIcon',
'SearchSmallIcon',
'XSmallIcon',
'AirportIcon',
'EcoIcon',
'GearIcon',
'HeartIcon',
'HomeIcon',
'InfoCircleIcon',
'ListUnorderedIcon',
'PrebookingIcon',
'SearchIcon',
'XIcon'
];
const DeprecatedIconsNames = Array.from(Object.keys(DeprecatedToValidIconsMap));

export default (file: FileInfo, api: API, options: Options) => {
const j = api.jscodeshift;
Expand Down

0 comments on commit 3af6bc6

Please sign in to comment.