eslint-plugin-react: v7.12.0 update throws AssertionError [ERR_ASSERTION]: Node must be provided when reporting error if location is not provided at assertValidNodeInfo

v7.12.0 is throws the following error

> eslint --ext .jsx,.js src/ etc/

AssertionError [ERR_ASSERTION]: Node must be provided when reporting error if location is not provided
    at assertValidNodeInfo (/node_modules/eslint/lib/util/report-translator.js:96:9)
    at args (/node_modules/eslint/lib/util/report-translator.js:246:9)
    at Object.report (/node_modules/eslint/lib/linter.js:720:41)
    at reportUndeclaredPropTypes (/node_modules/eslint-plugin-react/lib/rules/prop-types.js:175:17)
    at Program:exit.Object.keys.filter.forEach.component (/node_modules/eslint-plugin-react/lib/rules/prop-types.js:193:11)
    at Array.forEach (<anonymous>)
    at Object.Program:exit (/node_modules/eslint-plugin-react/lib/rules/prop-types.js:192:81)
    at updatedRuleInstructions.(anonymous function) (/node_modules/eslint-plugin-react/lib/util/Components.js:754:75)
    at listeners.(anonymous function).forEach.listener (/node_modules/eslint/lib/util/safe-emitter.js:45:58)
    at Array.forEach (<anonymous>)

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 15
  • Comments: 24 (12 by maintainers)

Commits related to this issue

Most upvoted comments

I’ll try to find time today.

@ljharb we are hitting this as well and updating eslint-plugin-react to use master fixes it. When do you anticipate https://github.com/yannickcr/eslint-plugin-react/commit/4da90ea19f805cb8e67523a983c2352aab144783 will land in a release?

I’m seeing this too. I use react-router which passes location and match as props. When I compare the location search, it throws this error:

  componentDidUpdate(prevProps) {
    const { match, location} = this.props;
    const searchEquals = prevProps.location.search === location.search;
    ...
  }

Hi,

I am still getting this issue with 7.12.1. Am I the only one? I made sure the package was updated correctly.

Thanks for all the hard work!