summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint
diff options
context:
space:
mode:
authorLuigi Pinca <luigipinca@gmail.com>2021-07-31 08:18:34 +0200
committerLuigi Pinca <luigipinca@gmail.com>2021-08-02 18:44:23 +0200
commit296354950c78636b6f2de20efea2fb24fbf39db3 (patch)
treefa4e9557634178e8bebc882620cdce53af10d384 /tools/node_modules/eslint
parent0f9434af4dcb01bc4685848de306e4fcdc2c61d5 (diff)
downloadnode-new-296354950c78636b6f2de20efea2fb24fbf39db3.tar.gz
tools: update ESLint to 7.32.0
PR-URL: https://github.com/nodejs/node/pull/39602 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Diffstat (limited to 'tools/node_modules/eslint')
-rw-r--r--tools/node_modules/eslint/README.md10
-rw-r--r--tools/node_modules/eslint/lib/cli-engine/cli-engine.js6
-rw-r--r--tools/node_modules/eslint/lib/cli.js13
-rw-r--r--tools/node_modules/eslint/lib/options.js6
-rw-r--r--tools/node_modules/eslint/lib/rules/comma-style.js2
-rw-r--r--tools/node_modules/eslint/lib/rules/curly.js13
-rw-r--r--tools/node_modules/eslint/node_modules/@babel/helper-validator-identifier/package.json2
-rw-r--r--tools/node_modules/eslint/node_modules/chalk/package.json2
-rw-r--r--tools/node_modules/eslint/node_modules/chalk/readme.md8
-rw-r--r--tools/node_modules/eslint/node_modules/flatted/package.json2
-rw-r--r--tools/node_modules/eslint/package.json4
11 files changed, 49 insertions, 19 deletions
diff --git a/tools/node_modules/eslint/README.md b/tools/node_modules/eslint/README.md
index 68982812e3..804310d8c1 100644
--- a/tools/node_modules/eslint/README.md
+++ b/tools/node_modules/eslint/README.md
@@ -254,6 +254,16 @@ Toru Nagashima
The people who review and fix bugs and help triage issues.
<table><tbody><tr><td align="center" valign="top" width="11%">
+<a href="https://github.com/brettz9">
+<img src="https://github.com/brettz9.png?s=75" width="75" height="75"><br />
+Brett Zamir
+</a>
+</td><td align="center" valign="top" width="11%">
+<a href="https://github.com/bmish">
+<img src="https://github.com/bmish.png?s=75" width="75" height="75"><br />
+Bryan Mishkin
+</a>
+</td><td align="center" valign="top" width="11%">
<a href="https://github.com/g-plane">
<img src="https://github.com/g-plane.png?s=75" width="75" height="75"><br />
Pig Fang
diff --git a/tools/node_modules/eslint/lib/cli-engine/cli-engine.js b/tools/node_modules/eslint/lib/cli-engine/cli-engine.js
index ca298f9c35..24f6a10d14 100644
--- a/tools/node_modules/eslint/lib/cli-engine/cli-engine.js
+++ b/tools/node_modules/eslint/lib/cli-engine/cli-engine.js
@@ -156,6 +156,9 @@ function calculateStatsPerFile(messages) {
return messages.reduce((stat, message) => {
if (message.fatal || message.severity === 2) {
stat.errorCount++;
+ if (message.fatal) {
+ stat.fatalErrorCount++;
+ }
if (message.fix) {
stat.fixableErrorCount++;
}
@@ -168,6 +171,7 @@ function calculateStatsPerFile(messages) {
return stat;
}, {
errorCount: 0,
+ fatalErrorCount: 0,
warningCount: 0,
fixableErrorCount: 0,
fixableWarningCount: 0
@@ -183,12 +187,14 @@ function calculateStatsPerFile(messages) {
function calculateStatsPerRun(results) {
return results.reduce((stat, result) => {
stat.errorCount += result.errorCount;
+ stat.fatalErrorCount += result.fatalErrorCount;
stat.warningCount += result.warningCount;
stat.fixableErrorCount += result.fixableErrorCount;
stat.fixableWarningCount += result.fixableWarningCount;
return stat;
}, {
errorCount: 0,
+ fatalErrorCount: 0,
warningCount: 0,
fixableErrorCount: 0,
fixableWarningCount: 0
diff --git a/tools/node_modules/eslint/lib/cli.js b/tools/node_modules/eslint/lib/cli.js
index f766764546..477310da58 100644
--- a/tools/node_modules/eslint/lib/cli.js
+++ b/tools/node_modules/eslint/lib/cli.js
@@ -131,14 +131,16 @@ function translateOptions({
*/
function countErrors(results) {
let errorCount = 0;
+ let fatalErrorCount = 0;
let warningCount = 0;
for (const result of results) {
errorCount += result.errorCount;
+ fatalErrorCount += result.fatalErrorCount;
warningCount += result.warningCount;
}
- return { errorCount, warningCount };
+ return { errorCount, fatalErrorCount, warningCount };
}
/**
@@ -314,9 +316,12 @@ const cli = {
if (await printResults(engine, resultsToPrint, options.format, options.outputFile)) {
// Errors and warnings from the original unfiltered results should determine the exit code
- const { errorCount, warningCount } = countErrors(results);
+ const { errorCount, fatalErrorCount, warningCount } = countErrors(results);
+
const tooManyWarnings =
options.maxWarnings >= 0 && warningCount > options.maxWarnings;
+ const shouldExitForFatalErrors =
+ options.exitOnFatalError && fatalErrorCount > 0;
if (!errorCount && tooManyWarnings) {
log.error(
@@ -325,6 +330,10 @@ const cli = {
);
}
+ if (shouldExitForFatalErrors) {
+ return 2;
+ }
+
return (errorCount || tooManyWarnings) ? 1 : 0;
}
diff --git a/tools/node_modules/eslint/lib/options.js b/tools/node_modules/eslint/lib/options.js
index 92c140bd3c..e3661ec81d 100644
--- a/tools/node_modules/eslint/lib/options.js
+++ b/tools/node_modules/eslint/lib/options.js
@@ -291,6 +291,12 @@ module.exports = optionator({
description: "Prevent errors when pattern is unmatched"
},
{
+ option: "exit-on-fatal-error",
+ type: "Boolean",
+ default: "false",
+ description: "Exit with exit code 2 in case of fatal error"
+ },
+ {
option: "debug",
type: "Boolean",
default: false,
diff --git a/tools/node_modules/eslint/lib/rules/comma-style.js b/tools/node_modules/eslint/lib/rules/comma-style.js
index fbdecccaac..824ad89b2f 100644
--- a/tools/node_modules/eslint/lib/rules/comma-style.js
+++ b/tools/node_modules/eslint/lib/rules/comma-style.js
@@ -216,6 +216,8 @@ module.exports = {
previousItemToken = tokenAfterItem
? sourceCode.getTokenBefore(tokenAfterItem)
: sourceCode.ast.tokens[sourceCode.ast.tokens.length - 1];
+ } else {
+ previousItemToken = currentItemToken;
}
});
diff --git a/tools/node_modules/eslint/lib/rules/curly.js b/tools/node_modules/eslint/lib/rules/curly.js
index 92d31a6476..61dcd8024b 100644
--- a/tools/node_modules/eslint/lib/rules/curly.js
+++ b/tools/node_modules/eslint/lib/rules/curly.js
@@ -132,15 +132,6 @@ module.exports = {
}
/**
- * Gets the `else` keyword token of a given `IfStatement` node.
- * @param {ASTNode} node A `IfStatement` node to get.
- * @returns {Token} The `else` keyword token.
- */
- function getElseKeyword(node) {
- return node.alternate && sourceCode.getFirstTokenBetween(node.consequent, node.alternate, isElseKeywordToken);
- }
-
- /**
* Determines whether the given node has an `else` keyword token as the first token after.
* @param {ASTNode} node The node to check.
* @returns {boolean} `true` if the node is followed by an `else` keyword token.
@@ -361,7 +352,7 @@ module.exports = {
if (this.expected) {
context.report({
node,
- loc: (name !== "else" ? node : getElseKeyword(node)).loc.start,
+ loc: body.loc,
messageId: opts && opts.condition ? "missingCurlyAfterCondition" : "missingCurlyAfter",
data: {
name
@@ -371,7 +362,7 @@ module.exports = {
} else {
context.report({
node,
- loc: (name !== "else" ? node : getElseKeyword(node)).loc.start,
+ loc: body.loc,
messageId: opts && opts.condition ? "unexpectedCurlyAfterCondition" : "unexpectedCurlyAfter",
data: {
name
diff --git a/tools/node_modules/eslint/node_modules/@babel/helper-validator-identifier/package.json b/tools/node_modules/eslint/node_modules/@babel/helper-validator-identifier/package.json
index 80b8c9aeaf..cf138d6f2c 100644
--- a/tools/node_modules/eslint/node_modules/@babel/helper-validator-identifier/package.json
+++ b/tools/node_modules/eslint/node_modules/@babel/helper-validator-identifier/package.json
@@ -1,6 +1,6 @@
{
"name": "@babel/helper-validator-identifier",
- "version": "7.14.5",
+ "version": "7.14.8",
"description": "Validate identifier/keywords name",
"repository": {
"type": "git",
diff --git a/tools/node_modules/eslint/node_modules/chalk/package.json b/tools/node_modules/eslint/node_modules/chalk/package.json
index c2d63f67e5..47c23f2906 100644
--- a/tools/node_modules/eslint/node_modules/chalk/package.json
+++ b/tools/node_modules/eslint/node_modules/chalk/package.json
@@ -1,6 +1,6 @@
{
"name": "chalk",
- "version": "4.1.1",
+ "version": "4.1.2",
"description": "Terminal string styling done right",
"license": "MIT",
"repository": "chalk/chalk",
diff --git a/tools/node_modules/eslint/node_modules/chalk/readme.md b/tools/node_modules/eslint/node_modules/chalk/readme.md
index 851259216b..a055d21c97 100644
--- a/tools/node_modules/eslint/node_modules/chalk/readme.md
+++ b/tools/node_modules/eslint/node_modules/chalk/readme.md
@@ -33,7 +33,7 @@
<br>
<br>
<a href="https://retool.com/?utm_campaign=sindresorhus">
- <img src="https://sindresorhus.com/assets/thanks/retool-logo.svg" width="210"/>
+ <img src="https://sindresorhus.com/assets/thanks/retool-logo.svg" width="230"/>
</a>
<br>
<br>
@@ -48,6 +48,12 @@
<span>and avoiding access controls. Keep your team and servers in sync with Doppler.</span>
</div>
</a>
+ <br>
+ <a href="https://uibakery.io/?utm_source=chalk&utm_medium=sponsor&utm_campaign=github">
+ <div>
+ <img src="https://sindresorhus.com/assets/thanks/uibakery-logo.jpg" width="270" alt="UI Bakery">
+ </div>
+ </a>
</p>
</div>
diff --git a/tools/node_modules/eslint/node_modules/flatted/package.json b/tools/node_modules/eslint/node_modules/flatted/package.json
index 405ccfd799..60f79eb730 100644
--- a/tools/node_modules/eslint/node_modules/flatted/package.json
+++ b/tools/node_modules/eslint/node_modules/flatted/package.json
@@ -1,6 +1,6 @@
{
"name": "flatted",
- "version": "3.2.1",
+ "version": "3.2.2",
"description": "A super light and fast circular JSON parser.",
"unpkg": "min.js",
"types": "types.d.ts",
diff --git a/tools/node_modules/eslint/package.json b/tools/node_modules/eslint/package.json
index 0e64b624b9..1845500824 100644
--- a/tools/node_modules/eslint/package.json
+++ b/tools/node_modules/eslint/package.json
@@ -1,6 +1,6 @@
{
"name": "eslint",
- "version": "7.31.0",
+ "version": "7.32.0",
"author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
"description": "An AST-based pattern checker for JavaScript.",
"bin": {
@@ -96,7 +96,7 @@
"ejs": "^3.0.2",
"eslint": "file:.",
"eslint-config-eslint": "file:packages/eslint-config-eslint",
- "eslint-plugin-eslint-plugin": "^3.2.0",
+ "eslint-plugin-eslint-plugin": "^3.5.3",
"eslint-plugin-internal-rules": "file:tools/internal-rules",
"eslint-plugin-jsdoc": "^25.4.3",
"eslint-plugin-node": "^11.1.0",