eslint-plugin-react-form-fields
Version:
React Form Fields specific linting rules for ESLint
13 lines (12 loc) • 474 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getAsPropValue = void 0;
const jsx_ast_utils_1 = require("jsx-ast-utils");
const getAsPropValue = (attributes
// eslint-disable-next-line @typescript-eslint/no-explicit-any
) => {
const asProp = (0, jsx_ast_utils_1.getProp)(attributes, 'as');
const asPropValue = (0, jsx_ast_utils_1.getLiteralPropValue)(asProp);
return asPropValue;
};
exports.getAsPropValue = getAsPropValue;