We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dda03e9 commit 78e2951Copy full SHA for 78e2951
lib/rules/no-unused-prop-types.js
@@ -266,7 +266,7 @@ module.exports = {
266
* @return {Boolean} True if the node is inside a lifecycle method
267
*/
268
function isInLifeCycleMethod(node) {
269
- if (node.type === 'MethodDefinition' && isNodeALifeCycleMethod(node)) {
+ if ((node.type === 'MethodDefinition' || node.type === 'Property') && isNodeALifeCycleMethod(node)) {
270
return true;
271
}
272
0 commit comments