diff --git a/packages/eslint-plugin-pf-codemods/src/rules/helpers/JSXAttributes.ts b/packages/eslint-plugin-pf-codemods/src/rules/helpers/JSXAttributes.ts index 9ae2c1c9..bf5c80d3 100644 --- a/packages/eslint-plugin-pf-codemods/src/rules/helpers/JSXAttributes.ts +++ b/packages/eslint-plugin-pf-codemods/src/rules/helpers/JSXAttributes.ts @@ -7,6 +7,7 @@ import { JSXFragment, JSXOpeningElement, MemberExpression, + Property, } from "estree-jsx"; export function getAttribute( @@ -128,12 +129,12 @@ export function getVariableValue( ); } if (variableInit.type === "Literal") { - return variableInit.value; + return variableInit.value as string; } if (variableInit.type === "MemberExpression") { return getMemberExpression(variableInit); } if (variableInit.type === "ObjectExpression") { - return variableInit.properties; + return variableInit.properties as Property[]; } }