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

build(deps): bump eslint from 8.51.0 to 8.52.0 #1641

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 23, 2023

Bumps eslint from 8.51.0 to 8.52.0.

Release notes

Sourced from eslint's releases.

v8.52.0

Features

  • 70648ee feat: report-unused-disable-directive to report unused eslint-enable (#17611) (Yosuke Ota)

Bug Fixes

  • 5de9637 fix: Ensure shared references in rule configs are separated (#17666) (Nicholas C. Zakas)
  • dcfe573 fix: add preceding semicolon in suggestions of no-object-constructor (#17649) (Francesco Trotta)

Documentation

  • 476d58a docs: Add note about invalid CLI flags when using flat config. (#17664) (Nicholas C. Zakas)
  • 660ed3a docs: Plugin flat config migration guide (#17640) (Nicholas C. Zakas)
  • a58aa20 docs: fix examples for several rules (#17645) (Milos Djermanovic)
  • 179929b docs: Remove trailing newline from the code of Playground links (#17641) (Francesco Trotta)
  • f8e5c30 docs: Update README (GitHub Actions Bot)
  • b7ef2f3 docs: Enable pretty code formatter output (#17635) (Nicholas C. Zakas)
  • 0bcb9a8 docs: Fix syntax errors in rule examples (#17633) (Francesco Trotta)
  • 61b9083 docs: Make no-continue example code work (#17643) (Zhongyuan Zhou)
  • 9fafe45 docs: upgrade to 11ty 2.0 (#17632) (Percy Ma)
  • ff8e4bf docs: Update README (GitHub Actions Bot)
  • fab249a docs: Update README (GitHub Actions Bot)
  • 392305b docs: Update no-irregular-whitespace and fix examples (#17626) (Francesco Trotta)
  • 6b8acfb docs: Add real whitespace to no-trailing-spaces examples (#17630) (Francesco Trotta)
  • 1000187 docs: Fix examples in unicode-bom (#17631) (Francesco Trotta)
  • 000290c docs: Update README (GitHub Actions Bot)

Chores

  • 6d1f0c2 chore: upgrade @​eslint/js@​8.52.0 (#17671) (Milos Djermanovic)
  • d63d4fe chore: package.json update for @​eslint/js release (ESLint Jenkins)
  • f30cefe test: fix FlatESLint tests for caching (#17658) (Milos Djermanovic)
  • ef650cb test: update tests for no-promise-executor-return (#17661) (Milos Djermanovic)
Changelog

Sourced from eslint's changelog.

v8.52.0 - October 20, 2023

  • 6d1f0c2 chore: upgrade @​eslint/js@​8.52.0 (#17671) (Milos Djermanovic)
  • d63d4fe chore: package.json update for @​eslint/js release (ESLint Jenkins)
  • 476d58a docs: Add note about invalid CLI flags when using flat config. (#17664) (Nicholas C. Zakas)
  • 5de9637 fix: Ensure shared references in rule configs are separated (#17666) (Nicholas C. Zakas)
  • f30cefe test: fix FlatESLint tests for caching (#17658) (Milos Djermanovic)
  • ef650cb test: update tests for no-promise-executor-return (#17661) (Milos Djermanovic)
  • 70648ee feat: report-unused-disable-directive to report unused eslint-enable (#17611) (Yosuke Ota)
  • dcfe573 fix: add preceding semicolon in suggestions of no-object-constructor (#17649) (Francesco Trotta)
  • 660ed3a docs: Plugin flat config migration guide (#17640) (Nicholas C. Zakas)
  • a58aa20 docs: fix examples for several rules (#17645) (Milos Djermanovic)
  • 179929b docs: Remove trailing newline from the code of Playground links (#17641) (Francesco Trotta)
  • f8e5c30 docs: Update README (GitHub Actions Bot)
  • b7ef2f3 docs: Enable pretty code formatter output (#17635) (Nicholas C. Zakas)
  • 0bcb9a8 docs: Fix syntax errors in rule examples (#17633) (Francesco Trotta)
  • 61b9083 docs: Make no-continue example code work (#17643) (Zhongyuan Zhou)
  • 9fafe45 docs: upgrade to 11ty 2.0 (#17632) (Percy Ma)
  • ff8e4bf docs: Update README (GitHub Actions Bot)
  • fab249a docs: Update README (GitHub Actions Bot)
  • 392305b docs: Update no-irregular-whitespace and fix examples (#17626) (Francesco Trotta)
  • 6b8acfb docs: Add real whitespace to no-trailing-spaces examples (#17630) (Francesco Trotta)
  • 1000187 docs: Fix examples in unicode-bom (#17631) (Francesco Trotta)
  • 000290c docs: Update README (GitHub Actions Bot)
Commits
  • 331cf62 8.52.0
  • 7dc28ed Build: changelog update for 8.52.0
  • 6d1f0c2 chore: upgrade @​eslint/js@​8.52.0 (#17671)
  • d63d4fe chore: package.json update for @​eslint/js release
  • 476d58a docs: Add note about invalid CLI flags when using flat config. (#17664)
  • 5de9637 fix: Ensure shared references in rule configs are separated (#17666)
  • f30cefe test: fix FlatESLint tests for caching (#17658)
  • ef650cb test: update tests for no-promise-executor-return (#17661)
  • 70648ee feat: report-unused-disable-directive to report unused eslint-enable (#17611)
  • dcfe573 fix: add preceding semicolon in suggestions of no-object-constructor (#17649)
  • Additional commits viewable in compare view

Dependabot compatibility score

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 commands and options

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 show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions

@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Oct 23, 2023
@github-actions github-actions bot enabled auto-merge (squash) October 23, 2023 02:52
@github-actions
Copy link
Contributor

Diff between eslint 8.51.0 and 8.52.0
diff --git a/lib/linter/apply-disable-directives.js b/lib/linter/apply-disable-directives.js
index v8.51.0..v8.52.0 100644
--- a/lib/linter/apply-disable-directives.js
+++ b/lib/linter/apply-disable-directives.js
@@ -31,5 +31,5 @@
 /**
  * Groups a set of directives into sub-arrays by their parent comment.
- * @param {Directive[]} directives Unused directives to be removed.
+ * @param {Iterable<Directive>} directives Unused directives to be removed.
  * @returns {Directive[][]} Directives grouped by their parent comment.
  */
@@ -178,8 +178,8 @@
 /**
  * Parses details from directives to create output Problems.
- * @param {Directive[]} allDirectives Unused directives to be removed.
+ * @param {Iterable<Directive>} allDirectives Unused directives to be removed.
  * @returns {{ description, fix, unprocessedDirective }[]} Details for later creation of output Problems.
  */
-function processUnusedDisableDirectives(allDirectives) {
+function processUnusedDirectives(allDirectives) {
     const directiveGroups = groupByParentComment(allDirectives);
 
@@ -201,4 +201,93 @@
 
 /**
+ * Collect eslint-enable comments that are removing suppressions by eslint-disable comments.
+ * @param {Directive[]} directives The directives to check.
+ * @returns {Set<Directive>} The used eslint-enable comments
+ */
+function collectUsedEnableDirectives(directives) {
+
+    /**
+     * A Map of `eslint-enable` keyed by ruleIds that may be marked as used.
+     * If `eslint-enable` does not have a ruleId, the key will be `null`.
+     * @type {Map<string|null, Directive>}
+     */
+    const enabledRules = new Map();
+
+    /**
+     * A Set of `eslint-enable` marked as used.
+     * It is also the return value of `collectUsedEnableDirectives` function.
+     * @type {Set<Directive>}
+     */
+    const usedEnableDirectives = new Set();
+
+    /*
+     * Checks the directives backwards to see if the encountered `eslint-enable` is used by the previous `eslint-disable`,
+     * and if so, stores the `eslint-enable` in `usedEnableDirectives`.
+     */
+    for (let index = directives.length - 1; index >= 0; index--) {
+        const directive = directives[index];
+
+        if (directive.type === "disable") {
+            if (enabledRules.size === 0) {
+                continue;
+            }
+            if (directive.ruleId === null) {
+
+                // If encounter `eslint-disable` without ruleId,
+                // mark all `eslint-enable` currently held in enabledRules as used.
+                // e.g.
+                //    /* eslint-disable */ <- current directive
+                //    /* eslint-enable rule-id1 */ <- used
+                //    /* eslint-enable rule-id2 */ <- used
+                //    /* eslint-enable */ <- used
+                for (const enableDirective of enabledRules.values()) {
+                    usedEnableDirectives.add(enableDirective);
+                }
+                enabledRules.clear();
+            } else {
+                const enableDirective = enabledRules.get(directive.ruleId);
+
+                if (enableDirective) {
+
+                    // If encounter `eslint-disable` with ruleId, and there is an `eslint-enable` with the same ruleId in enabledRules,
+                    // mark `eslint-enable` with ruleId as used.
+                    // e.g.
+                    //    /* eslint-disable rule-id */ <- current directive
+                    //    /* eslint-enable rule-id */ <- used
+                    usedEnableDirectives.add(enableDirective);
+                } else {
+                    const enabledDirectiveWithoutRuleId = enabledRules.get(null);
+
+                    if (enabledDirectiveWithoutRuleId) {
+
+                        // If encounter `eslint-disable` with ruleId, and there is no `eslint-enable` with the same ruleId in enabledRules,
+                        // mark `eslint-enable` without ruleId as used.
+                        // e.g.
+                        //    /* eslint-disable rule-id */ <- current directive
+                        //    /* eslint-enable */ <- used
+                        usedEnableDirectives.add(enabledDirectiveWithoutRuleId);
+                    }
+                }
+            }
+        } else if (directive.type === "enable") {
+            if (directive.ruleId === null) {
+
+                // If encounter `eslint-enable` without ruleId, the `eslint-enable` that follows it are unused.
+                // So clear enabledRules.
+                // e.g.
+                //    /* eslint-enable */ <- current directive
+                //    /* eslint-enable rule-id *// <- unused
+                //    /* eslint-enable */ <- unused
+                enabledRules.clear();
+                enabledRules.set(null, directive);
+            } else {
+                enabledRules.set(directive.ruleId, directive);
+            }
+        }
+    }
+    return usedEnableDirectives;
+}
+
+/**
  * This is the same as the exported function, except that it
  * doesn't handle disable-line and disable-next-line directives, and it always reports unused
@@ -207,5 +296,5 @@
  * for the exported function, except that `reportUnusedDisableDirectives` is not supported
  * (this function always reports unused disable directives).
- * @returns {{problems: LintMessage[], unusedDisableDirectives: LintMessage[]}} An object with a list
+ * @returns {{problems: LintMessage[], unusedDirectives: LintMessage[]}} An object with a list
  * of problems (including suppressed ones) and unused eslint-disable directives
  */
@@ -259,15 +348,40 @@
         .filter(directive => directive.type === "disable" && !usedDisableDirectives.has(directive));
 
-    const processed = processUnusedDisableDirectives(unusedDisableDirectivesToReport);
 
-    const unusedDisableDirectives = processed
+    const unusedEnableDirectivesToReport = new Set(
+        options.directives.filter(directive => directive.unprocessedDirective.type === "enable")
+    );
+
+    /*
+     * If directives has the eslint-enable directive,
+     * check whether the eslint-enable comment is used.
+     */
+    if (unusedEnableDirectivesToReport.size > 0) {
+        for (const directive of collectUsedEnableDirectives(options.directives)) {
+            unusedEnableDirectivesToReport.delete(directive);
+        }
+    }
+
+    const processed = processUnusedDirectives(unusedDisableDirectivesToReport)
+        .concat(processUnusedDirectives(unusedEnableDirectivesToReport));
+
+    const unusedDirectives = processed
         .map(({ description, fix, unprocessedDirective }) => {
             const { parentComment, type, line, column } = unprocessedDirective;
 
+            let message;
+
+            if (type === "enable") {
+                message = description
+                    ? `Unused eslint-enable directive (no matching eslint-disable directives were found for ${description}).`
+                    : "Unused eslint-enable directive (no matching eslint-disable directives were found).";
+            } else {
+                message = description
+                    ? `Unused eslint-disable directive (no problems were reported from ${description}).`
+                    : "Unused eslint-disable directive (no problems were reported).";
+            }
             return {
                 ruleId: null,
-                message: description
-                    ? `Unused eslint-disable directive (no problems were reported from ${description}).`
-                    : "Unused eslint-disable directive (no problems were reported).",
+                message,
                 line: type === "disable-next-line" ? parentComment.commentToken.loc.start.line : line,
                 column: type === "disable-next-line" ? parentComment.commentToken.loc.start.column + 1 : column,
@@ -278,5 +392,5 @@
         });
 
-    return { problems, unusedDisableDirectives };
+    return { problems, unusedDirectives };
 }
 
@@ -345,6 +459,6 @@
     return reportUnusedDisableDirectives !== "off"
         ? lineDirectivesResult.problems
-            .concat(blockDirectivesResult.unusedDisableDirectives)
-            .concat(lineDirectivesResult.unusedDisableDirectives)
+            .concat(blockDirectivesResult.unusedDirectives)
+            .concat(lineDirectivesResult.unusedDirectives)
             .sort(compareLocations)
         : lineDirectivesResult.problems;
diff --git a/lib/cli.js b/lib/cli.js
index v8.51.0..v8.52.0 100644
--- a/lib/cli.js
+++ b/lib/cli.js
@@ -319,5 +319,12 @@
         } catch (error) {
             debug("Error parsing CLI options:", error.message);
-            log.error(error.message);
+
+            let errorMessage = error.message;
+
+            if (usingFlatConfig) {
+                errorMessage += "\nYou're using eslint.config.js, some command line flags are no longer available. Please see https://eslint.org/docs/latest/use/command-line-interface for details.";
+            }
+
+            log.error(errorMessage);
             return 2;
         }
diff --git a/lib/config/flat-config-schema.js b/lib/config/flat-config-schema.js
index v8.51.0..v8.52.0 100644
--- a/lib/config/flat-config-schema.js
+++ b/lib/config/flat-config-schema.js
@@ -7,4 +7,14 @@
 
 //-----------------------------------------------------------------------------
+// Requirements
+//-----------------------------------------------------------------------------
+
+/*
+ * Note: This can be removed in ESLint v9 because structuredClone is available globally
+ * starting in Node.js v17.
+ */
+const structuredClone = require("@ungap/structured-clone").default;
+
+//-----------------------------------------------------------------------------
 // Type Definitions
 //-----------------------------------------------------------------------------
@@ -120,5 +130,5 @@
 
     finalOptions[0] = ruleSeverities.get(finalOptions[0]);
-    return finalOptions;
+    return structuredClone(finalOptions);
 }
 
@@ -379,46 +389,55 @@
         };
 
+
         for (const ruleId of Object.keys(result)) {
 
-            // avoid hairy edge case
-            if (ruleId === "__proto__") {
+            try {
 
-                /* eslint-disable-next-line no-proto -- Though deprecated, may still be present */
-                delete result.__proto__;
-                continue;
-            }
+                // avoid hairy edge case
+                if (ruleId === "__proto__") {
 
-            result[ruleId] = normalizeRuleOptions(result[ruleId]);
+                    /* eslint-disable-next-line no-proto -- Though deprecated, may still be present */
+                    delete result.__proto__;
+                    continue;
+                }
 
-            /*
-             * If either rule config is missing, then the correct
-             * config is already present and we just need to normalize
-             * the severity.
-             */
-            if (!(ruleId in first) || !(ruleId in second)) {
-                continue;
-            }
+                result[ruleId] = normalizeRuleOptions(result[ruleId]);
 
-            const firstRuleOptions = normalizeRuleOptions(first[ruleId]);
-            const secondRuleOptions = normalizeRuleOptions(second[ruleId]);
+                /*
+                 * If either rule config is missing, then the correct
+                 * config is already present and we just need to normalize
+                 * the severity.
+                 */
+                if (!(ruleId in first) || !(ruleId in second)) {
+                    continue;
+                }
 
-            /*
-             * If the second rule config only has a severity (length of 1),
-             * then use that severity and keep the rest of the options from
-             * the first rule config.
-             */
-            if (secondRuleOptions.length === 1) {
-                result[ruleId] = [secondRuleOptions[0], ...firstRuleOptions.slice(1)];
-                continue;
+                const firstRuleOptions = normalizeRuleOptions(first[ruleId]);
+                const secondRuleOptions = normalizeRuleOptions(second[ruleId]);
+
+                /*
+                 * If the second rule config only has a severity (length of 1),
+                 * then use that severity and keep the rest of the options from
+                 * the first rule config.
+                 */
+                if (secondRuleOptions.length === 1) {
+                    result[ruleId] = [secondRuleOptions[0], ...firstRuleOptions.slice(1)];
+                    continue;
+                }
+
+                /*
+                 * In any other situation, then the second rule config takes
+                 * precedence. That means the value at `result[ruleId]` is
+                 * already correct and no further work is necessary.
+                 */
+            } catch (ex) {
+                throw new Error(`Key "${ruleId}": ${ex.message}`, { cause: ex });
             }
 
-            /*
-             * In any other situation, then the second rule config takes
-             * precedence. That means the value at `result[ruleId]` is
-             * already correct and no further work is necessary.
-             */
         }
 
         return result;
+
+
     },
 
diff --git a/lib/rules/no-object-constructor.js b/lib/rules/no-object-constructor.js
index v8.51.0..v8.52.0 100644
--- a/lib/rules/no-object-constructor.js
+++ b/lib/rules/no-object-constructor.js
@@ -10,5 +10,5 @@
 //------------------------------------------------------------------------------
 
-const { getVariableByName, isArrowToken } = require("./utils/ast-utils");
+const { getVariableByName, isArrowToken, isClosingBraceToken, isClosingParenToken } = require("./utils/ast-utils");
 
 //------------------------------------------------------------------------------
@@ -16,4 +16,43 @@
 //------------------------------------------------------------------------------
 
+const BREAK_OR_CONTINUE = new Set(["BreakStatement", "ContinueStatement"]);
+
+// Declaration types that must contain a string Literal node at the end.
+const DECLARATIONS = new Set(["ExportAllDeclaration", "ExportNamedDeclaration", "ImportDeclaration"]);
+
+const IDENTIFIER_OR_KEYWORD = new Set(["Identifier", "Keyword"]);
+
+// Keywords that can immediately precede an ExpressionStatement node, mapped to the their node types.
+const NODE_TYPES_BY_KEYWORD = {
+    __proto__: null,
+    break: "BreakStatement",
+    continue: "ContinueStatement",
+    debugger: "DebuggerStatement",
+    do: "DoWhileStatement",
+    else: "IfStatement",
+    return: "ReturnStatement",
+    yield: "YieldExpression"
+};
+
+/*
+ * Before an opening parenthesis, `>` (for JSX), and postfix `++` and `--` always trigger ASI;
+ * the tokens `:`, `;`, `{` and `=>` don't expect a semicolon, as that would count as an empty statement.
+ */
+const PUNCTUATORS = new Set([":", ";", ">", "{", "=>", "++", "--"]);
+
+/*
+ * Statements that can contain an `ExpressionStatement` after a closing parenthesis.
+ * DoWhileStatement is an exception in that it always triggers ASI after the closing parenthesis.
+ */
+const STATEMENTS = new Set([
+    "DoWhileStatement",
+    "ForInStatement",
+    "ForOfStatement",
+    "ForStatement",
+    "IfStatement",
+    "WhileStatement",
+    "WithStatement"
+]);
+
 /**
  * Tests if a node appears at the beginning of an ancestor ExpressionStatement node.
@@ -54,5 +93,6 @@
         messages: {
             preferLiteral: "The object literal notation {} is preferable.",
-            useLiteral: "Replace with '{{replacement}}'."
+            useLiteral: "Replace with '{{replacement}}'.",
+            useLiteralAfterSemicolon: "Replace with '{{replacement}}', add preceding semicolon."
         }
     },
@@ -82,4 +122,48 @@
 
         /**
+         * Determines whether a parenthesized object literal that replaces a specified node needs to be preceded by a semicolon.
+         * @param {ASTNode} node The node to be replaced. This node should be at the start of an `ExpressionStatement` or at the start of the body of an `ArrowFunctionExpression`.
+         * @returns {boolean} Whether a semicolon is required before the parenthesized object literal.
+         */
+        function needsSemicolon(node) {
+            const prevToken = sourceCode.getTokenBefore(node);
+
+            if (!prevToken || prevToken.type === "Punctuator" && PUNCTUATORS.has(prevToken.value)) {
+                return false;
+            }
+
+            const prevNode = sourceCode.getNodeByRangeIndex(prevToken.range[0]);
+
+            if (isClosingParenToken(prevToken)) {
+                return !STATEMENTS.has(prevNode.type);
+            }
+
+            if (isClosingBraceToken(prevToken)) {
+                return (
+                    prevNode.type === "BlockStatement" && prevNode.parent.type === "FunctionExpression" ||
+                    prevNode.type === "ClassBody" && prevNode.parent.type === "ClassExpression" ||
+                    prevNode.type === "ObjectExpression"
+                );
+            }
+
+            if (IDENTIFIER_OR_KEYWORD.has(prevToken.type)) {
+                if (BREAK_OR_CONTINUE.has(prevNode.parent.type)) {
+                    return false;
+                }
+
+                const keyword = prevToken.value;
+                const nodeType = NODE_TYPES_BY_KEYWORD[keyword];
+
+                return prevNode.type !== nodeType;
+            }
+
+            if (prevToken.type === "String") {
+                return !DECLARATIONS.has(prevNode.parent.type);
+            }
+
+            return true;
+        }
+
+        /**
          * Reports on nodes where the `Object` constructor is called without arguments.
          * @param {ASTNode} node The node to evaluate.
@@ -94,6 +178,20 @@
 
             if (variable && variable.identifiers.length === 0) {
-                const replacement = needsParentheses(node) ? "({})" : "{}";
+                let replacement;
+                let fixText;
+                let messageId = "useLiteral";
 
+                if (needsParentheses(node)) {
+                    replacement = "({})";
+                    if (needsSemicolon(node)) {
+                        fixText = ";({})";
+                        messageId = "useLiteralAfterSemicolon";
+                    } else {
+                        fixText = "({})";
+                    }
+                } else {
+                    replacement = fixText = "{}";
+                }
+
                 context.report({
                     node,
@@ -101,7 +199,7 @@
                     suggest: [
                         {
-                            messageId: "useLiteral",
+                            messageId,
                             data: { replacement },
-                            fix: fixer => fixer.replaceText(node, replacement)
+                            fix: fixer => fixer.replaceText(node, fixText)
                         }
                     ]
diff --git a/lib/options.js b/lib/options.js
index v8.51.0..v8.52.0 100644
--- a/lib/options.js
+++ b/lib/options.js
@@ -48,5 +48,5 @@
  * @property {string[]} [plugin] Specify plugins
  * @property {string} [printConfig] Print the configuration for the given file
- * @property {boolean | undefined} reportUnusedDisableDirectives Adds reported errors for unused eslint-disable directives
+ * @property {boolean | undefined} reportUnusedDisableDirectives Adds reported errors for unused eslint-disable and eslint-enable directives
  * @property {string} [resolvePluginsRelativeTo] A folder where plugins should be resolved from, CWD by default
  * @property {Object} [rule] Specify rules
@@ -305,5 +305,5 @@
                 type: "Boolean",
                 default: void 0,
-                description: "Adds reported errors for unused eslint-disable directives"
+                description: "Adds reported errors for unused eslint-disable and eslint-enable directives"
             },
             {
diff --git a/package.json b/package.json
index v8.51.0..v8.52.0 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
 {
   "name": "eslint",
-  "version": "8.51.0",
+  "version": "8.52.0",
   "author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
   "description": "An AST-based pattern checker for JavaScript.",
@@ -64,8 +64,9 @@
     "@eslint-community/regexpp": "^4.6.1",
     "@eslint/eslintrc": "^2.1.2",
-    "@eslint/js": "8.51.0",
-    "@humanwhocodes/config-array": "^0.11.11",
+    "@eslint/js": "8.52.0",
+    "@humanwhocodes/config-array": "^0.11.13",
     "@humanwhocodes/module-importer": "^1.0.1",
     "@nodelib/fs.walk": "^1.2.8",
+    "@ungap/structured-clone": "^1.2.0",
     "ajv": "^6.12.4",
     "chalk": "^4.0.0",
diff --git a/conf/rule-type-list.json b/conf/rule-type-list.json
index v8.51.0..v8.52.0 100644
--- a/conf/rule-type-list.json
+++ b/conf/rule-type-list.json
@@ -1,36 +1,28 @@
 {
-    "types": [
-        { "name": "problem", "displayName": "Possible Problems", "description": "These rules relate to possible logic errors in code:" },
-        { "name": "suggestion", "displayName": "Suggestions", "description": "These rules suggest alternate ways of doing things:" },
-        { "name": "layout", "displayName": "Layout & Formatting", "description": "These rules care about how the code looks rather than how it executes:" }
-    ],
-    "deprecated": {
-        "name": "Deprecated",
-        "description": "These rules have been deprecated in accordance with the <a href=\"{{ '/use/rule-deprecation' | url }}\">deprecation policy</a>, and replaced by newer rules:",
-        "rules": []
+    "types": {
+        "problem": [],
+        "suggestion": [],
+        "layout": []
     },
-    "removed": {
-        "name": "Removed",
-        "description": "These rules from older versions of ESLint (before the <a href=\"{{ '/use/rule-deprecation' | url }}\">deprecation policy</a> existed) have been replaced by newer rules:",
-        "rules": [
-            { "removed": "generator-star", "replacedBy": ["generator-star-spacing"] },
-            { "removed": "global-strict", "replacedBy": ["strict"] },
-            { "removed": "no-arrow-condition", "replacedBy": ["no-confusing-arrow", "no-constant-condition"] },
-            { "removed": "no-comma-dangle", "replacedBy": ["comma-dangle"] },
-            { "removed": "no-empty-class", "replacedBy": ["no-empty-character-class"] },
-            { "removed": "no-empty-label", "replacedBy": ["no-labels"] },
-            { "removed": "no-extra-strict", "replacedBy": ["strict"] },
-            { "removed": "no-reserved-keys", "replacedBy": ["quote-props"] },
-            { "removed": "no-space-before-semi", "replacedBy": ["semi-spacing"] },
-            { "removed": "no-wrap-func", "replacedBy": ["no-extra-parens"] },
-            { "removed": "space-after-function-name", "replacedBy": ["space-before-function-paren"] },
-            { "removed": "space-after-keywords", "replacedBy": ["keyword-spacing"] },
-            { "removed": "space-before-function-parentheses", "replacedBy": ["space-before-function-paren"] },
-            { "removed": "space-before-keywords", "replacedBy": ["keyword-spacing"] },
-            { "removed": "space-in-brackets", "replacedBy": ["object-curly-spacing", "array-bracket-spacing"] },
-            { "removed": "space-return-throw-case", "replacedBy": ["keyword-spacing"] },
-            { "removed": "space-unary-word-ops", "replacedBy": ["space-unary-ops"] },
-            { "removed": "spaced-line-comment", "replacedBy": ["spaced-comment"] }
-        ]
-    }
+    "deprecated": [],
+    "removed": [
+        { "removed": "generator-star", "replacedBy": ["generator-star-spacing"] },
+        { "removed": "global-strict", "replacedBy": ["strict"] },
+        { "removed": "no-arrow-condition", "replacedBy": ["no-confusing-arrow", "no-constant-condition"] },
+        { "removed": "no-comma-dangle", "replacedBy": ["comma-dangle"] },
+        { "removed": "no-empty-class", "replacedBy": ["no-empty-character-class"] },
+        { "removed": "no-empty-label", "replacedBy": ["no-labels"] },
+        { "removed": "no-extra-strict", "replacedBy": ["strict"] },
+        { "removed": "no-reserved-keys", "replacedBy": ["quote-props"] },
+        { "removed": "no-space-before-semi", "replacedBy": ["semi-spacing"] },
+        { "removed": "no-wrap-func", "replacedBy": ["no-extra-parens"] },
+        { "removed": "space-after-function-name", "replacedBy": ["space-before-function-paren"] },
+        { "removed": "space-after-keywords", "replacedBy": ["keyword-spacing"] },
+        { "removed": "space-before-function-parentheses", "replacedBy": ["space-before-function-paren"] },
+        { "removed": "space-before-keywords", "replacedBy": ["keyword-spacing"] },
+        { "removed": "space-in-brackets", "replacedBy": ["object-curly-spacing", "array-bracket-spacing"] },
+        { "removed": "space-return-throw-case", "replacedBy": ["keyword-spacing"] },
+        { "removed": "space-unary-word-ops", "replacedBy": ["space-unary-ops"] },
+        { "removed": "spaced-line-comment", "replacedBy": ["spaced-comment"] }
+    ]
 }
diff --git a/README.md b/README.md
index v8.51.0..v8.52.0 100644
--- a/README.md
+++ b/README.md
@@ -255,4 +255,9 @@
 Yosuke Ota
 </a>
+</td><td align="center" valign="top" width="11%">
+<a href="https://github.com/Tanujkanti4441">
+<img src="https://github.com/Tanujkanti4441.png?s=75" width="75" height="75"><br />
+Tanuj Kanti
+</a>
 </td></tr></tbody></table>
 
@@ -289,5 +294,5 @@
 <p><a href="#"><img src="https://images.opencollective.com/2021-frameworks-fund/logo.png" alt="Chrome Frameworks Fund" height="undefined"></a> <a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="undefined"></a></p><h3>Gold Sponsors</h3>
 <p><a href="https://engineering.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></p><h3>Silver Sponsors</h3>
-<p><a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://opensource.siemens.com"><img src="https://avatars.githubusercontent.com/u/624020?v=4" alt="Siemens" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301?v=4" alt="American Express" height="64"></a></p><h3>Bronze Sponsors</h3>
+<p><a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301?v=4" alt="American Express" height="64"></a></p><h3>Bronze Sponsors</h3>
 <p><a href="https://themeisle.com"><img src="https://images.opencollective.com/themeisle/d5592fe/logo.png" alt="ThemeIsle" 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://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://transloadit.com/"><img src="https://avatars.githubusercontent.com/u/125754?v=4" alt="Transloadit" height="32"></a> <a href="https://www.ignitionapp.com"><img src="https://avatars.githubusercontent.com/u/5753491?v=4" alt="Ignition" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774?v=4" alt="HeroCoders" height="32"></a> <a href="https://quickbookstoolhub.com"><img src="https://avatars.githubusercontent.com/u/95090305?u=e5bc398ef775c9ed19f955c675cdc1fb6abf01df&v=4" alt="QuickBooks Tool hub" height="32"></a></p>
 <!--sponsorsend-->
Size Files
2.9 MB → 2.9 MB (+8.4 KB 🟡) 407 → 407 (±0 🟢)
Command details
npm diff --diff=eslint@8.51.0 --diff=eslint@8.52.0 --diff-unified=2

See also the npm diff document.

Reported by ybiquitous/npm-diff-action@v1.5.0 (Node.js 20.8.1 and npm 10.2.1)

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/eslint-8.52.0 branch from 086183c to a08d4b8 Compare October 23, 2023 02:53
Bumps [eslint](https://github.com/eslint/eslint) from 8.51.0 to 8.52.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.51.0...v8.52.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/eslint-8.52.0 branch from a08d4b8 to d081a18 Compare October 23, 2023 02:55
@github-actions github-actions bot merged commit caae843 into main Oct 23, 2023
@github-actions github-actions bot deleted the dependabot/npm_and_yarn/eslint-8.52.0 branch October 23, 2023 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants