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

Update: add enforceForJSX option to no-unused-expressions rule #14012

Merged
merged 11 commits into from Feb 10, 2021

Conversation

@duncanbeevers
Copy link
Contributor

@duncanbeevers duncanbeevers commented Jan 18, 2021

React's createElement call is side-effect free, as are most JSX pragmas.
An unused JSX element indicates a logic error in the same way any unused, side-effect free expression is.
This extension the no-unused-expression rule flags unused JSX elements unless the (new) allowJsx configuration option is set

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

  • Documentation update
  • Bug fix (template)
  • New rule (template)
  • Changes an existing rule (template)
  • Add autofixing to a rule
  • Add a CLI option
  • Add something to the core
  • Other, please explain:

What rule do you want to change?
no-unused-expression

Does this change cause the rule to produce more or fewer warnings?
More warnings; Unused JSX expressions are newly flagged

How will the change be implemented? (New option, new default behavior, etc.)?
New default behavior; new option to opt-out

No new default behavior; new option to opt-in

Please provide some example code that this change will affect:

// Flagged (with opt-in)
<div />

// Unflagged
const partial = <div />

What does the rule currently do for this code?
JSX expressions are currently ignored by no-unused-expression

What will the rule do after it's changed?
Unused JSX expressions will be flagged

What changes did you make? (Give an overview)

Added recognition for JSXElement in the no-unused-expression rule Checker, following the code patterns already in-place in the rule.
Added tests demonstrating flagged and unflagged code, and how the allowJsx option interacts with such code.

Is there anything you'd like reviewers to focus on?

This originally came out of this eslint-plugin-react PR.
The scope of this PR is somewhat smaller and had a couple of key differences.

  • It includes an escape hatch (allowJsx option) since some JSX pragmas may not be side-effect-free
  • It does not recognize literal React.createElement() calls; the original PR, focused on React, flagged these unused expressions
React's createElement call is side-effect free, as are most JSX pragmas.
An unused JSX element indicates a logic error in the same way any unused, side-effect free expression is.
This extension the no-unused-expression rule flags unused JSX elements unless the (new) allowJsx configuration option is set
ljharb
ljharb approved these changes Jan 18, 2021
Copy link
Contributor

@ljharb ljharb left a comment

allowJsx that defaults to false seems like a potential breaking change; it should probably be ignoreJSX that defaults to false?

Otherwise, this LGTM!

React's createElement call is side-effect free, as are most JSX pragmas.
An unused JSX element indicates a logic error in the same way any unused, side-effect free expression is.
This extension the no-unused-expression rule flags unused JSX elements when the (new) ignoreJSX configuration option is set
@duncanbeevers
Copy link
Contributor Author

@duncanbeevers duncanbeevers commented Jan 18, 2021

I've updated this PR, replacing the acceptJsx option with an ignoreJSX option.

The naming seems a little weird; I thought disallowJSX might be closer to what's intended, but ignoreJSX matches the option used by no-unused-parens, so it's not without precedent.

@mdjermanovic
Copy link
Member

@mdjermanovic mdjermanovic commented Jan 18, 2021

This used to be reported by default until ESLint v7.5.0.

In 6ea3178 we changed the logic of this rule, from reporting all expressions except those for which we know that they have side effects, to reporting only known expressions for which we are sure that they don't have side effects.

The goal was to avoid possible false positives with unknown nodes like experimental syntax, but it's possible that we forgot about JSX.

That said, it does seem better to have an option for JSX rather than reverting the old behavior, since we can't know whether it is React or something else.

@duncanbeevers
Copy link
Contributor Author

@duncanbeevers duncanbeevers commented Jan 19, 2021

I changed the no-unused-expression option name
ignoreJSXdisallowJSX

The naming reflects the opt-in nature of the API;
"Disallow unused JSX expressions? Yes!"

@duncanbeevers duncanbeevers requested a review from mdjermanovic Jan 19, 2021
@btmills
Copy link
Member

@btmills btmills commented Jan 22, 2021

@ljharb in the eslint-plugin-react PR, you wrote "A jsx element can’t be side-effecting." I know that's true for React, and I haven't encountered any non-React uses where it's false, but is it valid to assume it's always true? Since JSX is sugar for a function call, it'd be up to the semantics of whatever JSX pragma someone's using.

I ask because I think it makes a difference to end user developers. If ESLint can't assume JSX is side-effect free in all cases, checking for unused JSX would require developers to first be aware of this option and then enable it.

eslint-plugin-react can assume that JSX has no side effects. If you were to add the proposed rule to eslint-plugin-react, what are the chances it'd make it into react/recommended? That seems like it would help the largest number of developers.

I realize a whole new rule is a lot more implementation than an option on the built-in rule. I'm open to adding this option, but I think doing it this way would help fewer developers avoid the exact footguns that inspired the original rule proposal.

@ljharb
Copy link
Contributor

@ljharb ljharb commented Jan 22, 2021

I agree it could be theoretically side-effecting, but jsx isn’t a standard - it’s react-specific syntax that a few other ecosystems have co-opted, and as you say, all co-opted similarly.

Adding a new rule to a config is a breaking change, and i don't plan for one any time soon, but surely it would go there on the next semver-major, should such a rule exist.

However, this seems like a reasonable option here, since it wouldn’t be enabled by default, and any ecosystem that chose to make jsx have side effects would likely find “tell users to disable this rule’s option” to be the least of their problems.

@duncanbeevers
Copy link
Contributor Author

@duncanbeevers duncanbeevers commented Jan 22, 2021

any ecosystem that chose to make jsx have side effects would likely find “tell users to disable this rule’s option” to be the least of their problems.

😂

@mdjermanovic
Copy link
Member

@mdjermanovic mdjermanovic commented Jan 28, 2021

TSC Summary: no-unused-expressions currently doesn't report JSX expressions. This might be an unintentional regression introduced in v7.5.0, when we switched from maintaining a list of nodes that shouldn't be reported to maintaining a list of nodes that should be reported. On the other hand, the actual behavior (not reporting JSX) is in line with our policy of not assuming any semantics for JSX, per which we can't know whether or not JSX is side-effect free.

This PR aims to add an option for JSX expressions to the no-unused-expressions rule. Default value retains the current v7.18.0 behavior (not reporting JSX). When set, it restores pre-v7.5.0 behavior (reporting JSX).

TSC Question: shall we accept this PR?

Copy link
Member

@btmills btmills left a comment

We're on board to add this as an opt-in option, so I've labeled it as accepted!

I feel kind of guilty bikeshedding the option name, but it took me a minute to resolve the double negative, and I'm wondering if it's just me. Once we've settled on the name, can you document it in docs/rules/no-unused-expressions.md and indicate that it's disabled by default?

@@ -50,6 +50,10 @@ module.exports = {
allowTaggedTemplates: {
type: "boolean",
default: false
},
disallowJSX: {
Copy link
Member

@btmills btmills Jan 29, 2021

I see how the name disallowJSX follows from the implementation, but I'm wondering if the double negative might confuse users. For consistency with the other options, I could go for your original option name allowJSX but defaulting to true so it's not a breaking change. I also think checkJSX defaulting to false would be clear. Anyone have any preferences?

Copy link
Contributor

@ljharb ljharb Jan 29, 2021

It’s always super weird when absence and false aren’t the same - iow, i think a boolean option should never default to true.

Copy link
Member

@btmills btmills Jan 29, 2021

That’s a great point. I also wasn’t thrilled about another “allow” option having the opposite default, so checkJSX seems like the better trade off now.

Copy link
Member

@mdjermanovic mdjermanovic Jan 29, 2021

Maybe enforceForJSX?

tests/lib/rules/no-unused-expressions.js Show resolved Hide resolved
@duncanbeevers
Copy link
Contributor Author

@duncanbeevers duncanbeevers commented Jan 30, 2021

  • Updated option name to enforceForJSX
  • Added valid tests cases for enforceForJSX option-enabled element and fragment usages
  • Added simple documentation for the option to docs/rules/no-unused-expressions.md

I considered adding more explanation to the documentation, but I didn't want to lead readers into the weeds.
Hopefully the simple explanation suffices.

mergify bot added a commit to p6m7g8/p6common that referenced this issue Mar 18, 2021
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

If you make any changes to it yourself then they will take precedence over the rebase.

---

[//]: # (dependabot-end)

Bumps [eslint](https://github.com/eslint/eslint) from 7.15.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>
<h2>v7.21.0</h2>
<ul>
<li><a href="https://github.com/eslint/eslint/commit/3cd5440b94d5fa4f11a09f50b685f6150f0c2d41"><code>3cd5440</code></a> Upgrade: @eslint/eslintrc to 0.4.0 (<a href="https://github.com/eslint/eslint/issues/14147">#14147</a>) (Brandon Mills)</li>
<li><a href="https://github.com/eslint/eslint/commit/c0b8c71df4d0b3f54b20587432d9133741985d5c"><code>c0b8c71</code></a> Upgrade: Puppeteer to 7.1.0 (<a href="https://github.com/eslint/eslint/issues/14122">#14122</a>) (Tim van der Lippe)</li>
<li><a href="https://github.com/eslint/eslint/commit/08ae31e539e381cd0eabf6393fa5c20f1d59125f"><code>08ae31e</code></a> New: Implement cacheStrategy (refs <a href="https://github.com/eslint/rfcs/issues/63">eslint/rfcs#63</a>) (<a href="https://github.com/eslint/eslint/issues/14119">#14119</a>) (Manu Chambon)</li>
<li><a href="https://github.com/eslint/eslint/commit/5e51fd28dc773c11c924450d24088f97f2824f00"><code>5e51fd2</code></a> Update: do not ignore symbolic links (fixes <a href="https://github.com/eslint/eslint/issues/13551">#13551</a>, fixes <a href="https://github.com/eslint/eslint/issues/13615">#13615</a>) (<a href="https://github.com/eslint/eslint/issues/14126">#14126</a>) (Pig Fang)</li>
<li><a href="https://github.com/eslint/eslint/commit/87c43a5d7ea2018cffd6d9b5c431ecb60caaf0d6"><code>87c43a5</code></a> Chore: improve a few comments and fix typos (<a href="https://github.com/eslint/eslint/issues/14125">#14125</a>) (Tobias Nießen)</li>
<li><a href="https://github.com/eslint/eslint/commit/e19c51ea2ef2cf666d94218c66f6b223bb2e9dae"><code>e19c51e</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/b8aea9988b6451b6a05af4f3ede8d6ed5c1d9926"><code>b8aea99</code></a> Fix: pluralize 'line' to 'lines' in max-lines-per-function description (<a href="https://github.com/eslint/eslint/issues/14115">#14115</a>) (Trevin Hofmann)</li>
<li><a href="https://github.com/eslint/eslint/commit/f5b53e285ab5286ea382d73b379b820f649c20d0"><code>f5b53e2</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/eee12134ce0956e9f825c1630776b1731551a948"><code>eee1213</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/5c4d7ea8d2e8d137c42b918dc99a84b4a5fed9b3"><code>5c4d7ea</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
</ul>
<h2>v7.20.0</h2>
<ul>
<li><a href="https://github.com/eslint/eslint/commit/f4ac3b0e7072fbd3c14e9c64ff0c2c255a4eb730"><code>f4ac3b0</code></a> Docs: fix sibling selector descriptions (<a href="https://github.com/eslint/eslint/issues/14099">#14099</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/9d6063add931f0803cae1676d5df307baf114360"><code>9d6063a</code></a> Fix: Crash with esquery when using JSX (fixes <a href="https://github.com/eslint/eslint/issues/13639">#13639</a>) (<a href="https://github.com/eslint/eslint/issues/14072">#14072</a>) (Yosuke Ota)</li>
<li><a href="https://github.com/eslint/eslint/commit/a0871f1840060bd23cfe0952a096b107142db2f0"><code>a0871f1</code></a> Docs: Triage process (<a href="https://github.com/eslint/eslint/issues/14014">#14014</a>) (Nicholas C. Zakas)</li>
<li><a href="https://github.com/eslint/eslint/commit/ad9076183bc2c2029525edfc4596e403999348d1"><code>ad90761</code></a> Update: add enforceForJSX option to no-unused-expressions rule (<a href="https://github.com/eslint/eslint/issues/14012">#14012</a>) (Duncan Beevers)</li>
<li><a href="https://github.com/eslint/eslint/commit/d6c84af67318537177ffac0120a81af08e3e9df4"><code>d6c84af</code></a> Fix: <code>--init</code> autoconfig shouldn't add deprecated rules (fixes <a href="https://github.com/eslint/eslint/issues/14017">#14017</a>) (<a href="https://github.com/eslint/eslint/issues/14060">#14060</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/9b277a16a7261e51b7ba36d6de7f996e9203a6a4"><code>9b277a1</code></a> Fix: Support ENOTDIR error code in the folder existence checking utility (<a href="https://github.com/eslint/eslint/issues/13973">#13973</a>) (Constantine Genchevsky)</li>
<li><a href="https://github.com/eslint/eslint/commit/7aeb12798f2b9da706f3593f26a02e717929c9af"><code>7aeb127</code></a> Upgrade: pin @babel/code-frame@7.12.11 (<a href="https://github.com/eslint/eslint/issues/14067">#14067</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/b4e2af5db1c29343ffec2cd104b04bf39b77ee56"><code>b4e2af5</code></a> Docs: Add more fields to bug report template (<a href="https://github.com/eslint/eslint/issues/14039">#14039</a>) (Nicholas C. Zakas)</li>
<li><a href="https://github.com/eslint/eslint/commit/96f1d49a4647e59f2fb918be096654e290513adc"><code>96f1d49</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/cb27b0abeda6dfee55dd43b9cbe12afad321f55d"><code>cb27b0a</code></a> Build: package.json update for eslint-config-eslint release (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/4cab165bf4e6e5e9f42a59a37a8ff2548c0af87d"><code>4cab165</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
</ul>
<h2>v7.19.0</h2>
<ul>
<li><a href="https://github.com/eslint/eslint/commit/ce7f06121d9eb9cc2b3da24b4456b4d382e1413b"><code>ce7f061</code></a> Update: add shadowed variable loc to message in no-shadow (fixes <a href="https://github.com/eslint/eslint/issues/13646">#13646</a>) (<a href="https://github.com/eslint/eslint/issues/13841">#13841</a>) (t-mangoe)</li>
<li><a href="https://github.com/eslint/eslint/commit/c60e23ff306a14ca6eabcadb275ed27995fcc6e4"><code>c60e23f</code></a> Update: fix <code>let</code> logic in for-in and for-of loops in no-extra-parens (<a href="https://github.com/eslint/eslint/issues/14011">#14011</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/d76e8f69bd791357c67ada7b5c55608acf29b622"><code>d76e8f6</code></a> Fix: no-useless-rename invalid autofix with parenthesized identifiers (<a href="https://github.com/eslint/eslint/issues/14032">#14032</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/5800d921144ec330b6ee7cd03364434007331354"><code>5800d92</code></a> Docs: Clarify stylistic rule update policy (<a href="https://github.com/eslint/eslint/issues/14052">#14052</a>) (Brandon Mills)</li>
<li><a href="https://github.com/eslint/eslint/commit/0ccf6d200147437b338cadb34546451972befd75"><code>0ccf6d2</code></a> Docs: remove configuring.md (<a href="https://github.com/eslint/eslint/issues/14036">#14036</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/65bb0abde56f72586036fff151aa2d13f1b7be6c"><code>65bb0ab</code></a> Chore: Clean up new issue workflow (<a href="https://github.com/eslint/eslint/issues/14040">#14040</a>) (Nicholas C. Zakas)</li>
<li><a href="https://github.com/eslint/eslint/commit/e1da90fc414a3c9c16f52db4a5bd81bd4f9532a4"><code>e1da90f</code></a> Fix: nested indenting for offsetTernaryExpressions: true (fixes <a href="https://github.com/eslint/eslint/issues/13971">#13971</a>) (<a href="https://github.com/eslint/eslint/issues/13972">#13972</a>) (Chris Brody)</li>
<li><a href="https://github.com/eslint/eslint/commit/1a078b9166f29cb3760435ddbc1a0da4a0974d4a"><code>1a078b9</code></a> Update: check ternary <code>:</code> even if <code>?</code> was reported in space-infix-ops (<a href="https://github.com/eslint/eslint/issues/13963">#13963</a>) (Milos Djermanovic)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</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>
<p>v7.21.0 - February 27, 2021</p>
<ul>
<li><a href="https://github.com/eslint/eslint/commit/3cd5440b94d5fa4f11a09f50b685f6150f0c2d41"><code>3cd5440</code></a> Upgrade: @eslint/eslintrc to 0.4.0 (<a href="https://github.com/eslint/eslint/issues/14147">#14147</a>) (Brandon Mills)</li>
<li><a href="https://github.com/eslint/eslint/commit/c0b8c71df4d0b3f54b20587432d9133741985d5c"><code>c0b8c71</code></a> Upgrade: Puppeteer to 7.1.0 (<a href="https://github.com/eslint/eslint/issues/14122">#14122</a>) (Tim van der Lippe)</li>
<li><a href="https://github.com/eslint/eslint/commit/08ae31e539e381cd0eabf6393fa5c20f1d59125f"><code>08ae31e</code></a> New: Implement cacheStrategy (refs <a href="https://github.com/eslint/rfcs/issues/63">eslint/rfcs#63</a>) (<a href="https://github.com/eslint/eslint/issues/14119">#14119</a>) (Manu Chambon)</li>
<li><a href="https://github.com/eslint/eslint/commit/5e51fd28dc773c11c924450d24088f97f2824f00"><code>5e51fd2</code></a> Update: do not ignore symbolic links (fixes <a href="https://github.com/eslint/eslint/issues/13551">#13551</a>, fixes <a href="https://github.com/eslint/eslint/issues/13615">#13615</a>) (<a href="https://github.com/eslint/eslint/issues/14126">#14126</a>) (Pig Fang)</li>
<li><a href="https://github.com/eslint/eslint/commit/87c43a5d7ea2018cffd6d9b5c431ecb60caaf0d6"><code>87c43a5</code></a> Chore: improve a few comments and fix typos (<a href="https://github.com/eslint/eslint/issues/14125">#14125</a>) (Tobias Nießen)</li>
<li><a href="https://github.com/eslint/eslint/commit/e19c51ea2ef2cf666d94218c66f6b223bb2e9dae"><code>e19c51e</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/b8aea9988b6451b6a05af4f3ede8d6ed5c1d9926"><code>b8aea99</code></a> Fix: pluralize 'line' to 'lines' in max-lines-per-function description (<a href="https://github.com/eslint/eslint/issues/14115">#14115</a>) (Trevin Hofmann)</li>
<li><a href="https://github.com/eslint/eslint/commit/f5b53e285ab5286ea382d73b379b820f649c20d0"><code>f5b53e2</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/eee12134ce0956e9f825c1630776b1731551a948"><code>eee1213</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/5c4d7ea8d2e8d137c42b918dc99a84b4a5fed9b3"><code>5c4d7ea</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
</ul>
<p>v7.20.0 - February 12, 2021</p>
<ul>
<li><a href="https://github.com/eslint/eslint/commit/f4ac3b0e7072fbd3c14e9c64ff0c2c255a4eb730"><code>f4ac3b0</code></a> Docs: fix sibling selector descriptions (<a href="https://github.com/eslint/eslint/issues/14099">#14099</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/9d6063add931f0803cae1676d5df307baf114360"><code>9d6063a</code></a> Fix: Crash with esquery when using JSX (fixes <a href="https://github.com/eslint/eslint/issues/13639">#13639</a>) (<a href="https://github.com/eslint/eslint/issues/14072">#14072</a>) (Yosuke Ota)</li>
<li><a href="https://github.com/eslint/eslint/commit/a0871f1840060bd23cfe0952a096b107142db2f0"><code>a0871f1</code></a> Docs: Triage process (<a href="https://github.com/eslint/eslint/issues/14014">#14014</a>) (Nicholas C. Zakas)</li>
<li><a href="https://github.com/eslint/eslint/commit/ad9076183bc2c2029525edfc4596e403999348d1"><code>ad90761</code></a> Update: add enforceForJSX option to no-unused-expressions rule (<a href="https://github.com/eslint/eslint/issues/14012">#14012</a>) (Duncan Beevers)</li>
<li><a href="https://github.com/eslint/eslint/commit/d6c84af67318537177ffac0120a81af08e3e9df4"><code>d6c84af</code></a> Fix: <code>--init</code> autoconfig shouldn't add deprecated rules (fixes <a href="https://github.com/eslint/eslint/issues/14017">#14017</a>) (<a href="https://github.com/eslint/eslint/issues/14060">#14060</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/9b277a16a7261e51b7ba36d6de7f996e9203a6a4"><code>9b277a1</code></a> Fix: Support ENOTDIR error code in the folder existence checking utility (<a href="https://github.com/eslint/eslint/issues/13973">#13973</a>) (Constantine Genchevsky)</li>
<li><a href="https://github.com/eslint/eslint/commit/7aeb12798f2b9da706f3593f26a02e717929c9af"><code>7aeb127</code></a> Upgrade: pin @babel/code-frame@7.12.11 (<a href="https://github.com/eslint/eslint/issues/14067">#14067</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/b4e2af5db1c29343ffec2cd104b04bf39b77ee56"><code>b4e2af5</code></a> Docs: Add more fields to bug report template (<a href="https://github.com/eslint/eslint/issues/14039">#14039</a>) (Nicholas C. Zakas)</li>
<li><a href="https://github.com/eslint/eslint/commit/96f1d49a4647e59f2fb918be096654e290513adc"><code>96f1d49</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/cb27b0abeda6dfee55dd43b9cbe12afad321f55d"><code>cb27b0a</code></a> Build: package.json update for eslint-config-eslint release (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/4cab165bf4e6e5e9f42a59a37a8ff2548c0af87d"><code>4cab165</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
</ul>
<p>v7.19.0 - January 30, 2021</p>
<ul>
<li><a href="https://github.com/eslint/eslint/commit/ce7f06121d9eb9cc2b3da24b4456b4d382e1413b"><code>ce7f061</code></a> Update: add shadowed variable loc to message in no-shadow (fixes <a href="https://github.com/eslint/eslint/issues/13646">#13646</a>) (<a href="https://github.com/eslint/eslint/issues/13841">#13841</a>) (t-mangoe)</li>
<li><a href="https://github.com/eslint/eslint/commit/c60e23ff306a14ca6eabcadb275ed27995fcc6e4"><code>c60e23f</code></a> Update: fix <code>let</code> logic in for-in and for-of loops in no-extra-parens (<a href="https://github.com/eslint/eslint/issues/14011">#14011</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/d76e8f69bd791357c67ada7b5c55608acf29b622"><code>d76e8f6</code></a> Fix: no-useless-rename invalid autofix with parenthesized identifiers (<a href="https://github.com/eslint/eslint/issues/14032">#14032</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/5800d921144ec330b6ee7cd03364434007331354"><code>5800d92</code></a> Docs: Clarify stylistic rule update policy (<a href="https://github.com/eslint/eslint/issues/14052">#14052</a>) (Brandon Mills)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</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.15.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.15.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


</details>
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Aug 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants