From 710c10e54e61095eee49f69b1621fc7f0616fc87 Mon Sep 17 00:00:00 2001 From: Jan Potoms <2109932+Janpot@users.noreply.github.com> Date: Fri, 18 Oct 2024 17:38:24 +0200 Subject: [PATCH] Remove displayName property Signed-off-by: Jan Potoms <2109932+Janpot@users.noreply.github.com> --- .../pigment-css-react/src/utils/remove-prop-types-plugin.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/pigment-css-react/src/utils/remove-prop-types-plugin.ts b/packages/pigment-css-react/src/utils/remove-prop-types-plugin.ts index de48af2a..e7e83fd1 100644 --- a/packages/pigment-css-react/src/utils/remove-prop-types-plugin.ts +++ b/packages/pigment-css-react/src/utils/remove-prop-types-plugin.ts @@ -13,8 +13,9 @@ export const removePropTypesPlugin = declare<{}>((api) => { const property = left.get('property'); const isPropTypes = property.isIdentifier({ name: 'propTypes' }); const isMuiName = property.isIdentifier({ name: 'muiName' }); + const isDisplayName = property.isIdentifier({ name: 'displayName' }); - if (!isPropTypes && !isMuiName) { + if (!isPropTypes && !isMuiName && !isDisplayName) { return; } const parentExpression = path.findParent((p) => p.isExpressionStatement());