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

Fix isPragmaComponentWrapper #2125

Merged
merged 1 commit into from Jan 8, 2019
Merged

Fix isPragmaComponentWrapper #2125

merged 1 commit into from Jan 8, 2019

Conversation

CrOrc
Copy link
Contributor

@CrOrc CrOrc commented Jan 8, 2019

In isPragmaComponentWrapper check name of callee object if awailable.

Fixes #2124

In isPragmaComponentWrapper check name of callee object if available.

Fixes jsx-eslint#2124
Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a regression test?

lib/util/Components.js Show resolved Hide resolved
CrOrc added a commit to CrOrc/eslint-plugin-react that referenced this pull request Jan 8, 2019
Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ljharb ljharb added the bug label Jan 8, 2019
@ljharb ljharb merged commit 7f7b96d into jsx-eslint:master Jan 8, 2019
@rpellerin
Copy link

rpellerin commented Jan 15, 2019

When will this be released? The latest published version still has the bug.

@ljharb
Copy link
Member

ljharb commented Jan 17, 2019

v7.12.4 has been released.

@ghost ghost mentioned this pull request Jan 17, 2019
1 task
NimaSoroush pushed a commit to NimaSoroush/differencify that referenced this pull request Feb 16, 2019
## The devDependency [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) was updated from `7.12.3` to `7.12.4`.
This version is **not covered** by your **current version range**.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

---

<details>
<summary>Release Notes for v7.12.4</summary>

<h3>Fixed</h3>
<ul>
<li><a href="/yannickcr/eslint-plugin-react/blob/v7.12.4/docs/rules/no-unused-prop-types.md"><code>no-unused-prop-types</code></a>: avoid a crash (<a href="https://urls.greenkeeper.io/yannickcr/eslint-plugin-react/issues/2131" data-hovercard-type="issue" data-hovercard-url="/jsx-eslint/eslint-plugin-react/issues/2131/hovercard">#2131</a>, <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=45469" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://urls.greenkeeper.io/ljharb">@ljharb</a>)</li>
<li><a href="/yannickcr/eslint-plugin-react/blob/v7.12.4/docs/rules/prop-types.md"><code>prop-types</code></a>: avoid further crashes from nonexistent nodes in unusedPropTypes (<a href="https://urls.greenkeeper.io/yannickcr/eslint-plugin-react/issues/2127" data-hovercard-type="issue" data-hovercard-url="/jsx-eslint/eslint-plugin-react/issues/2127/hovercard">#2127</a>, <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=45469" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://urls.greenkeeper.io/ljharb">@ljharb</a>)</li>
<li><a href="/yannickcr/eslint-plugin-react/blob/v7.12.4/docs/rules/prop-types.md"><code>prop-types</code></a>: Read name of callee object (<a href="https://urls.greenkeeper.io/yannickcr/eslint-plugin-react/pull/2125" data-hovercard-type="pull_request" data-hovercard-url="/jsx-eslint/eslint-plugin-react/pull/2125/hovercard">#2125</a>, <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=817020" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://urls.greenkeeper.io/CrOrc">@CrOrc</a>)</li>
<li><a href="/yannickcr/eslint-plugin-react/blob/v7.12.4/docs/rules/prop-types.md"><code>prop-types</code></a>: Ignore reassignments when matching props declarations with components (<a href="https://urls.greenkeeper.io/yannickcr/eslint-plugin-react/issues/2051" data-hovercard-type="issue" data-hovercard-url="/jsx-eslint/eslint-plugin-react/issues/2051/hovercard">#2051</a>, <a href="https://urls.greenkeeper.io/yannickcr/eslint-plugin-react/issues/1957" data-hovercard-type="issue" data-hovercard-url="/jsx-eslint/eslint-plugin-react/issues/1957/hovercard">#1957</a>, <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=13209" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://urls.greenkeeper.io/yannickcr">@yannickcr</a>)</li>
<li><a href="/yannickcr/eslint-plugin-react/blob/v7.12.4/docs/rules/prop-types.md"><code>prop-types</code></a>, <a href="/yannickcr/eslint-plugin-react/blob/v7.12.4/docs/rules/no-unused-prop-types.md"><code>no-unused-prop-types</code></a>, <a href="/yannickcr/eslint-plugin-react/blob/v7.12.4/docs/rules/require-default-props.md"><code>require-default-props</code></a>: Detect components with return statement in switch/case (<a href="https://urls.greenkeeper.io/yannickcr/eslint-plugin-react/issues/2118" data-hovercard-type="issue" data-hovercard-url="/jsx-eslint/eslint-plugin-react/issues/2118/hovercard">#2118</a>, <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=13209" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://urls.greenkeeper.io/yannickcr">@yannickcr</a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li><a href="/yannickcr/eslint-plugin-react/blob/v7.12.4/docs/rules/prop-types.md"><code>prop-types</code></a>, <a href="/yannickcr/eslint-plugin-react/blob/v7.12.4/docs/rules/no-typos.md"><code>no-typos</code></a>: add passing test cases (<a href="https://urls.greenkeeper.io/yannickcr/eslint-plugin-react/issues/2123" data-hovercard-type="issue" data-hovercard-url="/jsx-eslint/eslint-plugin-react/issues/2123/hovercard">#2123</a>, <a href="https://urls.greenkeeper.io/yannickcr/eslint-plugin-react/issues/2128" data-hovercard-type="issue" data-hovercard-url="/jsx-eslint/eslint-plugin-react/issues/2128/hovercard">#2128</a>, <a href="https://urls.greenkeeper.io/yannickcr/eslint-plugin-react/issues/2136" data-hovercard-type="issue" data-hovercard-url="/jsx-eslint/eslint-plugin-react/issues/2136/hovercard">#2136</a>, <a href="https://urls.greenkeeper.io/yannickcr/eslint-plugin-react/issues/2134" data-hovercard-type="issue" data-hovercard-url="/jsx-eslint/eslint-plugin-react/issues/2134/hovercard">#2134</a>, <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=45469" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://urls.greenkeeper.io/ljharb">@ljharb</a>)</li>
</ul>
</details>

<details>
<summary>Commits</summary>
<p>The new version differs by 10 commits.</p>
<ul>
<li><a href="https://urls.greenkeeper.io/yannickcr/eslint-plugin-react/commit/433cc3f6fea3a202426cf8ea568aa4bf3fe7a415"><code>433cc3f</code></a> <code>Update CHANGELOG and bump version</code></li>
<li><a href="https://urls.greenkeeper.io/yannickcr/eslint-plugin-react/commit/536bc35643eacfacbeb2391c8ee49903b97954dc"><code>536bc35</code></a> <code>[Tests] <code>prop-types</code>: add case from #2134</code></li>
<li><a href="https://urls.greenkeeper.io/yannickcr/eslint-plugin-react/commit/df7ffc1b43964e5589f4c24eb8eaf03e1cb9a437"><code>df7ffc1</code></a> <code>[Tests] <code>no-typos</code>: test case from #2136</code></li>
<li><a href="https://urls.greenkeeper.io/yannickcr/eslint-plugin-react/commit/c7e5f384821d273f27c71030951fb6f02da5cfc6"><code>c7e5f38</code></a> <code>[Tests] improve version detection tests.</code></li>
<li><a href="https://urls.greenkeeper.io/yannickcr/eslint-plugin-react/commit/2dd2277cc4166e368a1dd172cfcebedcf930c212"><code>2dd2277</code></a> <code>[Tests] <code>prop-types</code>: add now-passing test case</code></li>
<li><a href="https://urls.greenkeeper.io/yannickcr/eslint-plugin-react/commit/84652b6527161f651a671754fb5f619296c3654e"><code>84652b6</code></a> <code>[Fix] <code>no-unused-prop-types</code>: avoid a crash</code></li>
<li><a href="https://urls.greenkeeper.io/yannickcr/eslint-plugin-react/commit/58ed9e9716f74dbf758766a5ac22425be411181f"><code>58ed9e9</code></a> <code>[Fix] <code>prop-types</code>: avoid further crashes from nonexistent nodes in unusedPropTypes</code></li>
<li><a href="https://urls.greenkeeper.io/yannickcr/eslint-plugin-react/commit/7f7b96d155dcb43baa3f438aa7c4720f0aa94298"><code>7f7b96d</code></a> <code>[Fix] <code>prop-types</code>: Read name of callee object.</code></li>
<li><a href="https://urls.greenkeeper.io/yannickcr/eslint-plugin-react/commit/5fc50aa9238768674cf2a2ca1d9676be629a920a"><code>5fc50aa</code></a> <code>[Fix] Ignore reassignments when matching props declarations with components</code></li>
<li><a href="https://urls.greenkeeper.io/yannickcr/eslint-plugin-react/commit/ba80a4c01b1086f6fd1202ebc9c262fc5f05b65b"><code>ba80a4c</code></a> <code>[Fix] Detect components with return statement in switch/case</code></li>
</ul>
<p>See the <a href="https://urls.greenkeeper.io/yannickcr/eslint-plugin-react/compare/2f5cec96eca70cfe579038c8b9a81ba5a6a88594...433cc3f6fea3a202426cf8ea568aa4bf3fe7a415">full diff</a></p>
</details>

<details>
  <summary>FAQ and help</summary>

  There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>

---


Your [Greenkeeper](https://greenkeeper.io) bot 🌴
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants