Skip to content
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

TypeError raised by forbid-prop-types #2684

Closed
tinder-devon-strawn opened this issue Jun 29, 2020 · 1 comment
Closed

TypeError raised by forbid-prop-types #2684

tinder-devon-strawn opened this issue Jun 29, 2020 · 1 comment

Comments

@tinder-devon-strawn
Copy link

tinder-devon-strawn commented Jun 29, 2020

Seems to be introduced in 7.20.1, probably caused by #2676

checkProperties() in forbid-prop-types.js throws an error when declarations arg is undefined:

TypeError: Cannot read property 'forEach' of undefined
    at checkProperties (/Users/devons/Projects/scratch/node_modules/eslint-plugin-react/lib/rules/forbid-prop-types.js:95:20)
    at CallExpression (/Users/devons/Projects/scratch/node_modules/eslint-plugin-react/lib/rules/forbid-prop-types.js:185:11)
    at /Users/devons/Projects/scratch/node_modules/eslint/lib/util/safe-emitter.js:47:58
    at Array.forEach (<anonymous>)
    at Object.emit (/Users/devons/Projects/scratch/node_modules/eslint/lib/util/safe-emitter.js:47:38)
    at NodeEventGenerator.applySelector (/Users/devons/Projects/scratch/node_modules/eslint/lib/util/node-event-generator.js:251:26)
    at NodeEventGenerator.applySelectors (/Users/devons/Projects/scratch/node_modules/eslint/lib/util/node-event-generator.js:280:22)
    at NodeEventGenerator.enterNode (/Users/devons/Projects/scratch/node_modules/eslint/lib/util/node-event-generator.js:294:14)
    at CodePathAnalyzer.enterNode (/Users/devons/Projects/scratch/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:608:23)
    at Traverser.enter [as _enter] (/Users/devons/Projects/scratch/node_modules/eslint/lib/linter.js:865:28)
@ljharb
Copy link
Member

ljharb commented Jun 29, 2020

Duplicate of #2682; fix will be released later today.

@ljharb ljharb closed this as completed Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants