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

[Breaking] add ChainExpression; CallExpression now includes arguments #102

Merged
merged 3 commits into from
Oct 7, 2020
Merged

Conversation

ljharb
Copy link
Member

@ljharb ljharb commented Sep 6, 2020

Tests are currently failing on master.

This PR fixes those tests, but in so doing, causes a potential breaking change - CallExpressions now include the invocation parens, and when available, the arguments.

It's not yet clear if this will break eslint-plugin-jsx-a11y; i'll test it with that and hopefully that will help inform if this is breaking or not.

Fixes #103.

@junoatwork
Copy link

FWIW I tested this PR on a large production project using eslint-plugin-jsx-a11y, eslint-plugin-react, and eslint-plugin-react-hooks . It solved the ChainExpression problem and did not introduce any other errors in our build.

junoatwork pushed a commit to junoatwork/jsx-ast-utils that referenced this pull request Oct 5, 2020
@ljharb ljharb merged commit 7d1e7e0 into jsx-eslint:master Oct 7, 2020
facebook-github-bot pushed a commit to facebook/flipper that referenced this pull request Dec 22, 2020
Summary:
Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from 7.21.3 to 7.21.5.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md">eslint-plugin-react's changelog</a>.</em></p>
<blockquote>
<h2><a href="https://github.com/yannickcr/eslint-plugin-react/compare/v7.21.4...v7.21.5">7.21.5</a> - 2020.10.19</h2>
<h3>Fixed</h3>
<ul>
<li>[<code>jsx-indent-props</code>]: Apply indentation when using brackets (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2826">#2826</a>[] <a href="https://github.com/Moong0122">Moong0122</a>)</li>
<li>[<code>jsx-handler-names</code>]: Skip inline handlers when checkInlineFunction=false (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2833">#2833</a>[] <a href="https://github.com/onigoetz">onigoetz</a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li>[Tests] <code>jsx-indent-props</code>: Add passing test (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2823">#2823</a>[] <a href="https://github.com/Hypnosphi">Hypnosphi</a>)</li>
</ul>
<p><a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2833">#2833</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2833">yannickcr/eslint-plugin-react#2833</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2826">#2826</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2826">yannickcr/eslint-plugin-react#2826</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2823">#2823</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2823">yannickcr/eslint-plugin-react#2823</a></p>
<h2><a href="https://github.com/yannickcr/eslint-plugin-react/compare/v7.21.3...v7.21.4">7.21.4</a> - 2020.10.09</h2>
<h3>Fixed</h3>
<ul>
<li>[<code>no-unused-prop-types</code>]: Silence false positive on <code>never</code> type in TS (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2815">#2815</a>[] <a href="https://github.com/pcorpet">pcorpet</a>)</li>
<li>[<code>jsx-indent-props</code>]: Apply indentation when operator is used in front of the upper line (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2808">#2808</a>[], <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2820">#2820</a>[] <a href="https://github.com/Moong0122">Moong0122</a>)</li>
<li>[Deps] update <code>jsx-ast-utils</code> (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2822">#2822</a>[] [jsx-eslint/jsx-ast-utils#102][] <a href="https://github.com/ljharb">ljharb</a>)</li>
</ul>
<p><a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2822">#2822</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2822">yannickcr/eslint-plugin-react#2822</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2820">#2820</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2820">yannickcr/eslint-plugin-react#2820</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2815">#2815</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2815">yannickcr/eslint-plugin-react#2815</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2808">#2808</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2808">yannickcr/eslint-plugin-react#2808</a>
[jsx-eslint/jsx-ast-utils#102]: <a href="https://github-redirect.dependabot.com/jsx-eslint/jsx-ast-utils/pull/102">jsx-eslint/jsx-ast-utils#102</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/yannickcr/eslint-plugin-react/commit/3aa3ce9b9f3f2a70ef00208d4dbced5e6c7565d3"><code>3aa3ce9</code></a> Update CHANGELOG and bump version</li>
<li><a href="https://github.com/yannickcr/eslint-plugin-react/commit/7ac05f016dfbe4e7a29b60c57f624116961cf586"><code>7ac05f0</code></a> [Deps] update <code>resolve</code></li>
<li><a href="https://github.com/yannickcr/eslint-plugin-react/commit/efd3da3dee8d7d0ad71da877cbb28c00f8fbeaf8"><code>efd3da3</code></a> [Fix] <code>jsx-handler-names</code>: Skip inline handlers when checkInlineFunction=false</li>
<li><a href="https://github.com/yannickcr/eslint-plugin-react/commit/aeff5ea7193ffd4b4b733917070116ba6a55c7db"><code>aeff5ea</code></a> [Tests] Add passing test for js-indent props</li>
<li><a href="https://github.com/yannickcr/eslint-plugin-react/commit/237547e345e452b9ecd56048256e5df5365e3377"><code>237547e</code></a> [Fix] <code>jsx-indent-props</code>: Apply indentation when using brackets</li>
<li><a href="https://github.com/yannickcr/eslint-plugin-react/commit/632639ba26f219340474e2a0a63b550af779a7eb"><code>632639b</code></a> Update CHANGELOG and bump version</li>
<li><a href="https://github.com/yannickcr/eslint-plugin-react/commit/802cdb80bebb15b43872eed7ca43b8770cc8a9e4"><code>802cdb8</code></a> [readme] clear up Fragment docs</li>
<li><a href="https://github.com/yannickcr/eslint-plugin-react/commit/896fe4b7ecf3f929aa60aacb9ac848a725badb6d"><code>896fe4b</code></a> [Tests] <code>jsx-indent-props</code> : Apply indentation when used expression</li>
<li><a href="https://github.com/yannickcr/eslint-plugin-react/commit/b7b023f1e2db6e97526a7cf33159a940bd0e308d"><code>b7b023f</code></a> [Deps] update <code>jsx-ast-utils</code></li>
<li><a href="https://github.com/yannickcr/eslint-plugin-react/commit/959fb233656dba0252b3442364aaaa911e48b600"><code>959fb23</code></a> [Fix] <code>jsx-indent-props</code>: Apply indentation when operator is used in front of...</li>
<li>Additional commits viewable in <a href="https://github.com/yannickcr/eslint-plugin-react/compare/v7.21.3...v7.21.5">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=eslint-plugin-react&package-manager=npm_and_yarn&previous-version=7.21.3&new-version=7.21.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

Pull Request resolved: #1784

Reviewed By: passy

Differential Revision: D25664504

Pulled By: cekkaewnumchai

fbshipit-source-id: 920cf9dda7235d8fbed2fa448f5adfd10e55f9c8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Support ChainExpression AST node type for optional chaining
3 participants