eslint 7.10.0 → 7.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +2 -2
- package/lib/rules/function-paren-newline.js +1 -1
- package/lib/rules/max-lines.js +8 -0
- package/lib/rules/no-extra-parens.js +16 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
v7.11.0 - October 9, 2020
|
2
|
+
|
3
|
+
* [`23e966f`](https://github.com/eslint/eslint/commit/23e966f6cf2a6c6b699dff5d6950ece3cc396498) Chore: Refactor CLIEngine tests (refs #13481) (#13709) (Nicholas C. Zakas)
|
4
|
+
* [`fa9429a`](https://github.com/eslint/eslint/commit/fa9429aac0ffed505f3f02e8fc75f646c69f5c61) Fix: don't count line after EOF in max-lines (#13735) (Milos Djermanovic)
|
5
|
+
* [`d973675`](https://github.com/eslint/eslint/commit/d973675a5c06a2bd4f8ce640c78b67842cfebfd4) Docs: Update anchor links to use existing linkrefs (refs #13715) (#13741) (Brandon Mills)
|
6
|
+
* [`2c6d774`](https://github.com/eslint/eslint/commit/2c6d774c89dcd14f386bd9d73d451fa2a892c3ef) Docs: Fix typos (#13730) (Frieder Bluemle)
|
7
|
+
* [`cc468c0`](https://github.com/eslint/eslint/commit/cc468c01021385a028de727eefcd442e7f34875c) Upgrade: eslint-visitor-keys@2.0.0 (#13732) (Milos Djermanovic)
|
8
|
+
* [`ab0ac6c`](https://github.com/eslint/eslint/commit/ab0ac6c532fb7b7d49779c8913146244d680743b) Docs: Fix anchor links (#13715) (Gary Moore)
|
9
|
+
* [`27f0de6`](https://github.com/eslint/eslint/commit/27f0de62e6281c28043be38ef051818c9edc15cd) Fix: account for linebreaks before postfix `++`/`--` in no-extra-parens (#13731) (Milos Djermanovic)
|
10
|
+
* [`da78fa1`](https://github.com/eslint/eslint/commit/da78fa11632a2908db4ac494012a16f5d5a88a64) Update: support async arrow fn in function-paren-newline (fixes #13728) (#13729) (Michal Dziekonski)
|
11
|
+
* [`fe301b8`](https://github.com/eslint/eslint/commit/fe301b8cc0762d7f4edd59603ca51ed0ec0c2a43) Docs: Add configuration comments in examples (#13738) (YeonJuan)
|
12
|
+
* [`504408c`](https://github.com/eslint/eslint/commit/504408cd65e9d8827b2b8bbeb8f589df90eee523) Sponsors: Sync README with website (ESLint Jenkins)
|
13
|
+
* [`3900659`](https://github.com/eslint/eslint/commit/390065985b2289ad4412a83598e3e833c382d27e) Sponsors: Sync README with website (ESLint Jenkins)
|
14
|
+
* [`c1974b3`](https://github.com/eslint/eslint/commit/c1974b3f7169a8e5fab7007df92d02d8c1a8d5a3) Sponsors: Sync README with website (ESLint Jenkins)
|
15
|
+
* [`6f4abe5`](https://github.com/eslint/eslint/commit/6f4abe5d5ade2711cc4c21bc8485af952763c2d3) Sponsors: Sync README with website (ESLint Jenkins)
|
16
|
+
|
1
17
|
v7.10.0 - September 26, 2020
|
2
18
|
|
3
19
|
* [`6919fbb`](https://github.com/eslint/eslint/commit/6919fbb83f86552b0f49ae749da866e4edc7c46a) Docs: Clarify that ignorePattern should be a string (refs #13029) (#13718) (Brandon Mills)
|
package/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[](https://www.npmjs.com/package/eslint)
|
2
2
|
[](https://www.npmjs.com/package/eslint)
|
3
3
|
[](https://github.com/eslint/eslint/actions)
|
4
4
|
[](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Feslint%2Feslint?ref=badge_shield)
|
@@ -266,7 +266,7 @@ The following companies, organizations, and individuals support ESLint's ongoing
|
|
266
266
|
<h3>Gold Sponsors</h3>
|
267
267
|
<p><a href="https://www.salesforce.com"><img src="https://images.opencollective.com/salesforce/ca8f997/logo.png" alt="Salesforce" height="96"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="96"></a> <a href="https://aka.ms/microsoftfossfund"><img src="https://avatars1.githubusercontent.com/u/67931232?u=7fddc652a464d7151b97e8f108392af7d54fa3e8&v=4" alt="Microsoft FOSS Fund Sponsorships" height="96"></a></p><h3>Silver Sponsors</h3>
|
268
268
|
<p><a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://www.ampproject.org/"><img src="https://images.opencollective.com/amp/c8a3b25/logo.png" alt="AMP Project" height="64"></a></p><h3>Bronze Sponsors</h3>
|
269
|
-
<p><a href="https://
|
269
|
+
<p><a href="https://writersperhour.com/write-my-essay"><img src="https://images.opencollective.com/writersperhour/5787d4b/logo.png" alt="Writers Per Hour" height="32"></a> <a href="https://www.betacalendars.com/printable-calendar"><img src="https://images.opencollective.com/betacalendars/9334b33/logo.png" alt="2021 calendar" height="32"></a> <a href="https://buy.fineproxy.org/eng/"><img src="https://images.opencollective.com/buy-fineproxy-org/2002c40/logo.png" alt="Buy.Fineproxy.Org" height="32"></a> <a href="https://www.veikkaajat.com"><img src="https://images.opencollective.com/veikkaajat/b92b427/logo.png" alt="Veikkaajat.com" height="32"></a> <a href="https://www.nettikasinot.media/"><img src="https://images.opencollective.com/nettikasinot-media/2dba7da/logo.png" alt="Nettikasinot.media" height="32"></a> <a href="https://www.norgekasino.com"><img src="https://images.opencollective.com/norgekasino/ecfd57a/logo.png" alt="Norgekasino" height="32"></a> <a href="https://www.japanesecasino.com/"><img src="https://images.opencollective.com/japanesecasino/b0ffe3c/logo.png" alt="Japanesecasino" height="32"></a> <a href="https://www.casinotop.com/"><img src="https://images.opencollective.com/casinotop-com/10fd95b/logo.png" alt="CasinoTop.com" height="32"></a> <a href="https://www.casinotopp.net/"><img src="https://images.opencollective.com/casino-topp/1dd399a/logo.png" alt="Casino Topp" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://www.kasinot.fi"><img src="https://images.opencollective.com/kasinot-fi/e09aa2e/logo.png" alt="Kasinot.fi" height="32"></a> <a href="https://www.pelisivut.com"><img src="https://images.opencollective.com/pelisivut/04f08f2/logo.png" alt="Pelisivut" height="32"></a> <a href="https://www.nettikasinot.org"><img src="https://images.opencollective.com/nettikasinot-org/53a4b44/logo.png" alt="Nettikasinot.org" height="32"></a> <a href="https://www.bonus.com.de/freispiele"><img src="https://images.opencollective.com/bonusfinder-deutschland/646169e/logo.png" alt="BonusFinder Deutschland" height="32"></a> <a href="null"><img src="https://images.opencollective.com/bugsnag-stability-monitoring/c2cef36/logo.png" alt="Bugsnag Stability Monitoring" height="32"></a> <a href="https://mixpanel.com"><img src="https://images.opencollective.com/mixpanel/cd682f7/logo.png" alt="Mixpanel" height="32"></a> <a href="https://www.vpsserver.com"><img src="https://images.opencollective.com/vpsservercom/logo.png" alt="VPS Server" height="32"></a> <a href="https://icons8.com"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8: free icons, photos, illustrations, and music" height="32"></a> <a href="https://discordapp.com"><img src="https://images.opencollective.com/discordapp/7e3d9a9/logo.png" alt="Discord" height="32"></a> <a href="https://themeisle.com"><img src="https://images.opencollective.com/themeisle/d5592fe/logo.png" alt="ThemeIsle" height="32"></a> <a href="https://www.marfeel.com/"><img src="https://images.opencollective.com/marfeel/4b88e30/logo.png" alt="Marfeel" height="32"></a> <a href="https://www.firesticktricks.com"><img src="https://images.opencollective.com/fire-stick-tricks/b8fbe2c/logo.png" alt="Fire Stick Tricks" height="32"></a></p>
|
270
270
|
<!--sponsorsend-->
|
271
271
|
|
272
272
|
## <a name="technology-sponsors"></a>Technology Sponsors
|
@@ -218,7 +218,7 @@ module.exports = {
|
|
218
218
|
}
|
219
219
|
|
220
220
|
case "ArrowFunctionExpression": {
|
221
|
-
const firstToken = sourceCode.getFirstToken(node);
|
221
|
+
const firstToken = sourceCode.getFirstToken(node, { skip: (node.async ? 1 : 0) });
|
222
222
|
|
223
223
|
if (!astUtils.isOpeningParenToken(firstToken)) {
|
224
224
|
|
package/lib/rules/max-lines.js
CHANGED
@@ -131,6 +131,14 @@ module.exports = {
|
|
131
131
|
text
|
132
132
|
}));
|
133
133
|
|
134
|
+
/*
|
135
|
+
* If file ends with a linebreak, `sourceCode.lines` will have one extra empty line at the end.
|
136
|
+
* That isn't a real line, so we shouldn't count it.
|
137
|
+
*/
|
138
|
+
if (lines.length > 1 && lodash.last(lines).text === "") {
|
139
|
+
lines.pop();
|
140
|
+
}
|
141
|
+
|
134
142
|
if (skipBlankLines) {
|
135
143
|
lines = lines.filter(l => l.text.trim() !== "");
|
136
144
|
}
|
@@ -1109,7 +1109,22 @@ module.exports = {
|
|
1109
1109
|
},
|
1110
1110
|
|
1111
1111
|
UnaryExpression: checkArgumentWithPrecedence,
|
1112
|
-
UpdateExpression
|
1112
|
+
UpdateExpression(node) {
|
1113
|
+
if (node.prefix) {
|
1114
|
+
checkArgumentWithPrecedence(node);
|
1115
|
+
} else {
|
1116
|
+
const { argument } = node;
|
1117
|
+
const operatorToken = sourceCode.getLastToken(node);
|
1118
|
+
|
1119
|
+
if (argument.loc.end.line === operatorToken.loc.start.line) {
|
1120
|
+
checkArgumentWithPrecedence(node);
|
1121
|
+
} else {
|
1122
|
+
if (hasDoubleExcessParens(argument)) {
|
1123
|
+
report(argument);
|
1124
|
+
}
|
1125
|
+
}
|
1126
|
+
}
|
1127
|
+
},
|
1113
1128
|
AwaitExpression: checkArgumentWithPrecedence,
|
1114
1129
|
|
1115
1130
|
VariableDeclarator(node) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "eslint",
|
3
|
-
"version": "7.
|
3
|
+
"version": "7.11.0",
|
4
4
|
"author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
|
5
5
|
"description": "An AST-based pattern checker for JavaScript.",
|
6
6
|
"bin": {
|
@@ -56,7 +56,7 @@
|
|
56
56
|
"enquirer": "^2.3.5",
|
57
57
|
"eslint-scope": "^5.1.1",
|
58
58
|
"eslint-utils": "^2.1.0",
|
59
|
-
"eslint-visitor-keys": "^
|
59
|
+
"eslint-visitor-keys": "^2.0.0",
|
60
60
|
"espree": "^7.3.0",
|
61
61
|
"esquery": "^1.2.0",
|
62
62
|
"esutils": "^2.0.2",
|
@@ -105,6 +105,7 @@
|
|
105
105
|
"eslint-release": "^2.0.0",
|
106
106
|
"eslump": "^2.0.0",
|
107
107
|
"esprima": "^4.0.1",
|
108
|
+
"fs-teardown": "^0.1.0",
|
108
109
|
"glob": "^7.1.6",
|
109
110
|
"jsdoc": "^3.5.5",
|
110
111
|
"karma": "^4.0.1",
|