React stateless components: propTypes conflicts with no-mutation
scottnonnenberg opened this issue · 2 comments
scottnonnenberg commented
If I write a stateless React component to prevent the no-this
rule from firing, while also using the excellent eslint-plugin-react
, I get warnings that I'm not defining propTypes
for my method.
However, I can't fix this without also running into the no-mutation
rule from this project:
HTML.propTypes = {
body: React.PropTypes.string,
};
I'd be happy to PR a non-default .propTypes
config exclusion for the no-mutation
rule. Or maybe allow a generic set of strings or patterns to exclude? What do you think?
kevinSuttle commented
As does defaultProps
.
joncursi commented
As does displayName