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

Support WeakRefs #13602

Closed
4 tasks done
mdjermanovic opened this issue Aug 21, 2020 · 3 comments
Closed
4 tasks done

Support WeakRefs #13602

mdjermanovic opened this issue Aug 21, 2020 · 3 comments
Assignees
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion core Relates to ESLint's core APIs and features new syntax This issue is related to new syntax that has reached stage 4 rule Relates to ESLint's core rules

Comments

@mdjermanovic
Copy link
Member

mdjermanovic commented Aug 21, 2020

WeakRefs proposal is now Stage 4.

https://github.com/tc39/proposal-weakrefs

(it seems the proposal's repo hasn't been updated yet with tc39/proposal-weakrefs#212, but it was official in tc39/proposals@489f6df and merged in the spec in tc39/ecma262@71c0897).

Not sure if the new syntax label is appropriate since this isn't "syntax".

@mdjermanovic mdjermanovic added enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules core Relates to ESLint's core APIs and features accepted There is consensus among the team that this change meets the criteria for inclusion new syntax This issue is related to new syntax that has reached stage 4 labels Aug 21, 2020
@mdjermanovic
Copy link
Member Author

As for no-extend-native, this rule currently doesn't report any errors in the following code:

/* global FinalizationRegistry, WeakRef */

FinalizationRegistry.prototype.foo = bar;
WeakRef.prototype.foo = bar;

It will start reporting this code, but not before the next ESLint major version when we will upgrade the globals package to ^13 or above.

The same applies to a configuration where the new es2021 environment (which contains FinalizationRegistry and WeakRef) is enabled.

So, regardless of user configuration, the no-extend-native rule will not disallow modifying FinalizationRegistry and WeakRef prototypes until ESLint v8.0.0.

This is in line with a similar decision in #11803 for new BigInt globals, where it was seen as a breaking change, and thus postponed for v7.0.0 (though, for most users the change probably happened before v7.0.0, because globals added BigInt globals in a minor version of the package, and we have ^ dependency).

kaicataldo pushed a commit that referenced this issue Aug 29, 2020
* Update: add es2021 environment (refs #13602)

* Add no-undef test
@mdjermanovic mdjermanovic added breaking This change is backwards-incompatible and removed enhancement This change enhances an existing feature of ESLint labels Sep 5, 2020
@mdjermanovic
Copy link
Member Author

Marked as breaking for Update 2: upgrading globals package, which would cause no-extend-native to report more errors.

@mdjermanovic
Copy link
Member Author

Per our updated semantic versioning policy, we merged the change in no-extend-native rule for a minor release, so this is now all done.

This was referenced Mar 18, 2021
facebook-github-bot pushed a commit to facebook/flipper that referenced this issue Mar 25, 2021
Summary:
Bumps [eslint](https://github.com/eslint/eslint) from 7.21.0 to 7.22.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/eslint/eslint/releases">eslint's releases</a>.</em></p>
<blockquote>
<h2>v7.22.0</h2>
<ul>
<li><a href="https://github.com/eslint/eslint/commit/3a432d82b3a5710aff7da20302fe0b94fedc46c2"><code>3a432d8</code></a> Docs: Improve documentation for indent rule (<a href="https://github.com/eslint/eslint/issues/14168">#14168</a>) (Serkan Özel)</li>
<li><a href="https://github.com/eslint/eslint/commit/f62ec8d30d925e70e4d0d40640857c587ac2e116"><code>f62ec8d</code></a> Update: throw error when fix range is invalid (<a href="https://github.com/eslint/eslint/issues/14142">#14142</a>) (Jacob Bandes-Storch)</li>
<li><a href="https://github.com/eslint/eslint/commit/0eecad271358f753730741fcfcb2f7cc915c1fa7"><code>0eecad2</code></a> Upgrade: Update lodash in package.json to V 4.17.21 (<a href="https://github.com/eslint/eslint/issues/14159">#14159</a>) (Basem Al-Nabulsi)</li>
<li><a href="https://github.com/eslint/eslint/commit/5ad91aa7df3d6bc185786e6eccd9e055fd951055"><code>5ad91aa</code></a> Update: report es2021 globals in no-extend-native (refs <a href="https://github.com/eslint/eslint/issues/13602">#13602</a>) (<a href="https://github.com/eslint/eslint/issues/14177">#14177</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/c295581aca4e08ec4ae8e5ee5726a6f454a3ee26"><code>c295581</code></a> Chore: remove leftover JSDoc from lint-result-cache (<a href="https://github.com/eslint/eslint/issues/14176">#14176</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/0d541f9d9d58966372e2055a8f69fb9483d56a4b"><code>0d541f9</code></a> Chore: Reduce lodash usage (<a href="https://github.com/eslint/eslint/issues/14178">#14178</a>) (Stephen Wade)</li>
<li><a href="https://github.com/eslint/eslint/commit/27a67d71ffa9bbd7af02ae448844e127bcf956dc"><code>27a67d7</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/459d821f4a599501ceb002f9d7a5034fc45ffbb0"><code>459d821</code></a> Chore: upgrade dependencies of browser test (<a href="https://github.com/eslint/eslint/issues/14127">#14127</a>) (Pig Fang)</li>
<li><a href="https://github.com/eslint/eslint/commit/ebfb63a682004a008f2707dbad616e5ae1630b2c"><code>ebfb63a</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/3ba029fbffd44068be93254890fc2aec3e92c212"><code>3ba029f</code></a> Docs: Remove Extraneous Dash (<a href="https://github.com/eslint/eslint/issues/14164">#14164</a>) (Danny Hurlburt)</li>
<li><a href="https://github.com/eslint/eslint/commit/6f4540ea7ea39775906526506fd7abd7ea97610c"><code>6f4540e</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/ddf361ca2a2a01a9974f421e5f62270df282d0e8"><code>ddf361c</code></a> Docs: Fix Formatting (<a href="https://github.com/eslint/eslint/issues/14154">#14154</a>) (Danny Hurlburt)</li>
<li><a href="https://github.com/eslint/eslint/commit/c0d2ac16f8f9c75c62c78e9fe6a24a25ba0d7828"><code>c0d2ac1</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/a8df03efe3bc47665d2112c2cdd5bead337d475d"><code>a8df03e</code></a> Docs: Clarify triage process (<a href="https://github.com/eslint/eslint/issues/14117">#14117</a>) (Nicholas C. Zakas)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/eslint/eslint/blob/master/CHANGELOG.md">eslint's changelog</a>.</em></p>
<blockquote>
<p>v7.22.0 - March 12, 2021</p>
<ul>
<li><a href="https://github.com/eslint/eslint/commit/3a432d82b3a5710aff7da20302fe0b94fedc46c2"><code>3a432d8</code></a> Docs: Improve documentation for indent rule (<a href="https://github.com/eslint/eslint/issues/14168">#14168</a>) (Serkan Özel)</li>
<li><a href="https://github.com/eslint/eslint/commit/f62ec8d30d925e70e4d0d40640857c587ac2e116"><code>f62ec8d</code></a> Update: throw error when fix range is invalid (<a href="https://github.com/eslint/eslint/issues/14142">#14142</a>) (Jacob Bandes-Storch)</li>
<li><a href="https://github.com/eslint/eslint/commit/0eecad271358f753730741fcfcb2f7cc915c1fa7"><code>0eecad2</code></a> Upgrade: Update lodash in package.json to V 4.17.21 (<a href="https://github.com/eslint/eslint/issues/14159">#14159</a>) (Basem Al-Nabulsi)</li>
<li><a href="https://github.com/eslint/eslint/commit/5ad91aa7df3d6bc185786e6eccd9e055fd951055"><code>5ad91aa</code></a> Update: report es2021 globals in no-extend-native (refs <a href="https://github.com/eslint/eslint/issues/13602">#13602</a>) (<a href="https://github.com/eslint/eslint/issues/14177">#14177</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/c295581aca4e08ec4ae8e5ee5726a6f454a3ee26"><code>c295581</code></a> Chore: remove leftover JSDoc from lint-result-cache (<a href="https://github.com/eslint/eslint/issues/14176">#14176</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/0d541f9d9d58966372e2055a8f69fb9483d56a4b"><code>0d541f9</code></a> Chore: Reduce lodash usage (<a href="https://github.com/eslint/eslint/issues/14178">#14178</a>) (Stephen Wade)</li>
<li><a href="https://github.com/eslint/eslint/commit/27a67d71ffa9bbd7af02ae448844e127bcf956dc"><code>27a67d7</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/459d821f4a599501ceb002f9d7a5034fc45ffbb0"><code>459d821</code></a> Chore: upgrade dependencies of browser test (<a href="https://github.com/eslint/eslint/issues/14127">#14127</a>) (Pig Fang)</li>
<li><a href="https://github.com/eslint/eslint/commit/ebfb63a682004a008f2707dbad616e5ae1630b2c"><code>ebfb63a</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/3ba029fbffd44068be93254890fc2aec3e92c212"><code>3ba029f</code></a> Docs: Remove Extraneous Dash (<a href="https://github.com/eslint/eslint/issues/14164">#14164</a>) (Danny Hurlburt)</li>
<li><a href="https://github.com/eslint/eslint/commit/6f4540ea7ea39775906526506fd7abd7ea97610c"><code>6f4540e</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/ddf361ca2a2a01a9974f421e5f62270df282d0e8"><code>ddf361c</code></a> Docs: Fix Formatting (<a href="https://github.com/eslint/eslint/issues/14154">#14154</a>) (Danny Hurlburt)</li>
<li><a href="https://github.com/eslint/eslint/commit/c0d2ac16f8f9c75c62c78e9fe6a24a25ba0d7828"><code>c0d2ac1</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/a8df03efe3bc47665d2112c2cdd5bead337d475d"><code>a8df03e</code></a> Docs: Clarify triage process (<a href="https://github.com/eslint/eslint/issues/14117">#14117</a>) (Nicholas C. Zakas)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/eslint/eslint/commit/6ee803747fd996ff3bbcea2f7adcd560eae22576"><code>6ee8037</code></a> 7.22.0</li>
<li><a href="https://github.com/eslint/eslint/commit/a55e8a1a0174aee09e406d261ccb9b2bf7449602"><code>a55e8a1</code></a> Build: changelog update for 7.22.0</li>
<li><a href="https://github.com/eslint/eslint/commit/3a432d82b3a5710aff7da20302fe0b94fedc46c2"><code>3a432d8</code></a> Docs: Improve documentation for indent rule (<a href="https://github.com/eslint/eslint/issues/14168">#14168</a>)</li>
<li><a href="https://github.com/eslint/eslint/commit/f62ec8d30d925e70e4d0d40640857c587ac2e116"><code>f62ec8d</code></a> Update: throw error when fix range is invalid (<a href="https://github.com/eslint/eslint/issues/14142">#14142</a>)</li>
<li><a href="https://github.com/eslint/eslint/commit/0eecad271358f753730741fcfcb2f7cc915c1fa7"><code>0eecad2</code></a> Upgrade: Update lodash in package.json to V 4.17.21 (<a href="https://github.com/eslint/eslint/issues/14159">#14159</a>)</li>
<li><a href="https://github.com/eslint/eslint/commit/5ad91aa7df3d6bc185786e6eccd9e055fd951055"><code>5ad91aa</code></a> Update: report es2021 globals in no-extend-native (refs <a href="https://github.com/eslint/eslint/issues/13602">#13602</a>) (<a href="https://github.com/eslint/eslint/issues/14177">#14177</a>)</li>
<li><a href="https://github.com/eslint/eslint/commit/c295581aca4e08ec4ae8e5ee5726a6f454a3ee26"><code>c295581</code></a> Chore: remove leftover JSDoc from lint-result-cache (<a href="https://github.com/eslint/eslint/issues/14176">#14176</a>)</li>
<li><a href="https://github.com/eslint/eslint/commit/0d541f9d9d58966372e2055a8f69fb9483d56a4b"><code>0d541f9</code></a> Chore: Reduce lodash usage (<a href="https://github.com/eslint/eslint/issues/14178">#14178</a>)</li>
<li><a href="https://github.com/eslint/eslint/commit/27a67d71ffa9bbd7af02ae448844e127bcf956dc"><code>27a67d7</code></a> Sponsors: Sync README with website</li>
<li><a href="https://github.com/eslint/eslint/commit/459d821f4a599501ceb002f9d7a5034fc45ffbb0"><code>459d821</code></a> Chore: upgrade dependencies of browser test (<a href="https://github.com/eslint/eslint/issues/14127">#14127</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/eslint/eslint/compare/v7.21.0...v7.22.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=eslint&package-manager=npm_and_yarn&previous-version=7.21.0&new-version=7.22.0)](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: #2054

Reviewed By: passy

Differential Revision: D27230363

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 27ff5431b86f91b543cdc7093f8eed9c5147a489
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Sep 6, 2021
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Sep 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion core Relates to ESLint's core APIs and features new syntax This issue is related to new syntax that has reached stage 4 rule Relates to ESLint's core rules
Projects
None yet
Development

No branches or pull requests

1 participant