Skip to content

Commit

Permalink
Add prettier-ignore to few types that have a TS/prettier bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Oksamies committed Oct 5, 2024
1 parent 40a56fd commit 1ff9967
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/cyberstorm/src/newComponents/Image/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,11 @@ export const Image = React.forwardRef<HTMLDivElement, ImageProps>(

Image.displayName = "Image";

// There is an issue with Typescript (eslint) and prettier disagreeing if
// the type should have parentheses
// prettier-ignore
const getIcon = (type: ImageProps["cardType"] = "community") =>
({
community: faGamepad,
package: faBan,
})[type];
}[type]);
3 changes: 3 additions & 0 deletions packages/cyberstorm/src/primitiveComponents/utils/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ export const textStyleOptions = [
"fontFamilyHubot",
] as const;

// There is an issue with Typescript (eslint) and prettier disagreeing if
// the type should have parentheses
// prettier-ignore
export type TextStyles = (typeof textStyleOptions)[number];

interface TooltipWrapperProps extends PropsWithChildren {
Expand Down

0 comments on commit 1ff9967

Please sign in to comment.