Skip to content

no-unused-prop-types: Potential regression introduced in 7.5.0 #1542

@LINKIWI

Description

@LINKIWI

Hi there.

Noticed that my lint step failed after tagging my library with no code changes:

https://travis-ci.org/LINKIWI/react-elemental/builds/304035438
https://travis-ci.org/LINKIWI/react-elemental/builds/304036629

Interestingly, the failing build pulled in 7.5.0 of eslint-plugin-react which was published a couple minutes before the build kicked off.

I haven't had time to do thorough investigation yet, but the 7.5.0 release seems to have introduced a regression in no-unused-prop-types:

Cannot read property 'properties' of undefined

TypeError: Cannot read property 'properties' of undefined

    at markPropTypesAsUsed (/home/travis/build/LINKIWI/react-elemental/node_modules/eslint-plugin-react/lib/rules/no-unused-prop-types.js:658:40)

    at handleSetStateUpdater (/home/travis/build/LINKIWI/react-elemental/node_modules/eslint-plugin-react/lib/rules/no-unused-prop-types.js:955:7)

    at Object.handleFunctionLikeExpressions (/home/travis/build/LINKIWI/react-elemental/node_modules/eslint-plugin-react/lib/rules/no-unused-prop-types.js:964:7)

    at updatedRuleInstructions.(anonymous function) (/home/travis/build/LINKIWI/react-elemental/node_modules/eslint-plugin-react/lib/util/Components.js:654:75)

    at listeners.(anonymous function).forEach.listener (/home/travis/build/LINKIWI/react-elemental/node_modules/eslint/lib/util/safe-emitter.js:47:58)

    at Array.forEach (native)

    at Object.emit (/home/travis/build/LINKIWI/react-elemental/node_modules/eslint/lib/util/safe-emitter.js:47:38)

    at NodeEventGenerator.applySelector (/home/travis/build/LINKIWI/react-elemental/node_modules/eslint/lib/util/node-event-generator.js:251:26)

    at NodeEventGenerator.applySelectors (/home/travis/build/LINKIWI/react-elemental/node_modules/eslint/lib/util/node-event-generator.js:280:22)

    at NodeEventGenerator.enterNode (/home/travis/build/LINKIWI/react-elemental/node_modules/eslint/lib/util/node-event-generator.js:294:14)

    at CodePathAnalyzer.enterNode (/home/travis/build/LINKIWI/react-elemental/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:608:23)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy