Skip to content

no-unused-state: Cannot read property 'add' of null #2096

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dylang opened this issue Dec 28, 2018 · 1 comment
Closed

no-unused-state: Cannot read property 'add' of null #2096

dylang opened this issue Dec 28, 2018 · 1 comment

Comments

@dylang
Copy link

dylang commented Dec 28, 2018

We have hundreds of files with JSX so I'm not sure which one is leading to this exception.

  • 7.11.1: No error.
  • v7.12.0: The following error.
TypeError: Cannot read property 'add' of null
    at Object.CallExpression (./eslint-plugin-react/lib/rules/no-unused-state.js:269:31)
    at updatedRuleInstructions.(anonymous function) (./eslint-plugin-react/lib/util/Components.js:754:75)
    at listeners.(anonymous function).forEach.listener (./eslint/lib/util/safe-emitter.js:45:58)
    at Array.forEach (<anonymous>)
    at Object.emit (./eslint/lib/util/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (./eslint/lib/util/node-event-generator.js:251:26)
    at NodeEventGenerator.applySelectors (./eslint/lib/util/node-event-generator.js:280:22)
    at NodeEventGenerator.enterNode (./eslint/lib/util/node-event-generator.js:294:14)
    at CodePathAnalyzer.enterNode (./eslint/lib/code-path-analysis/code-path-analyzer.js:632:23)
    at nodeQueue.forEach.traversalInfo (./eslint/lib/linter.js:750:28)
@alexzherdev
Copy link
Contributor

Probably caused by #2084

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants