jsx-eslint/eslint-plugin-react
在 GitHub 查看New rule: identify missing PropType definition
Open
#1,887 创建于 2018年7月18日
help wantednew rule
描述
I accidentally forgot to add the PropTypes assignment to a prop and this was not picked up by eslint:
const propTypes = {
actions: {
something: PropTypes.func.isRequired,
}.isRequired,
};
should have been
const propTypes = {
actions: PropTypes.shape({
something: PropTypes.func.isRequired,
}).isRequired,
};