Hi, we have a component that should inherit the prop types of another component, like this
FrontPageHero.propTypes = {
...HeroBaseModel.propTypes,
lang: PropTypes.shape({
originMattersLabel: PropTypes.string.isRequired,
}).isRequired,
};
Object.assign syntax seems to work fine, but when using such a ES6 syntax, namely the spread operator, the view-models or actually eslint-plugin-view-models package throws an error and does not generate the required model
TypeError: Cannot read properties of undefined (reading 'name')
Occurred while linting
Rule: "view-models/no-errors"
Is it possible to add spread operator support to avoid the error? Given the fact that the use of such syntax is allowed in the eslint-plugin-react module, according to this thread jsx-eslint/eslint-plugin-react#1541
Hi, we have a component that should inherit the prop types of another component, like this
Object.assign syntax seems to work fine, but when using such a ES6 syntax, namely the spread operator, the
view-modelsor actuallyeslint-plugin-view-modelspackage throws an error and does not generate the required modelIs it possible to add spread operator support to avoid the error? Given the fact that the use of such syntax is allowed in the
eslint-plugin-reactmodule, according to this thread jsx-eslint/eslint-plugin-react#1541