Closed iamricard closed 7 years ago
Hey @rcsole!
First off, great plugin!
Thanks :D
I was wondering if you'd accept a PR modifying fp/no-mutation to allow for a pattern such as this
This is already possible using the exceptions
option in the rule. See https://github.com/jfmengels/eslint-plugin-fp/blob/master/docs/rules/no-mutation.md for how to set that up properly.
/* eslint fp/no-mutation: ["error", {"exceptions": [{"property": "propTypes"}]}] */
function Component(props) {
// ...
}
Component.propTypes = {
// ...
};
If you feel that the documentation is not clear, feel free to make a PR to try and make it clearer.
There doesn't seem to be a different way to define propType validation and use stateless components at the same time.
Yes, there is none in React that I'm aware of...
Hi 👋 ,
First off, great plugin! I was wondering if you'd accept a PR modifying
fp/no-mutation
to allow for a pattern such as this:There doesn't seem to be a different way to define
propType
validation and use stateless components at the same time.