From b88e3d83a88b45826701914ad53b9f09790ee110 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 22 Jun 2026 13:43:03 +0800 Subject: [PATCH] Update ESLint related dependencies to v68 (#19408) Co-authored-by: fisker Cheung Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> --- eslint.config.js | 34 +++++++++++--------- package.json | 2 +- tests/integration/__tests__/patterns-dirs.js | 2 +- yarn.lock | 10 +++--- 4 files changed, 25 insertions(+), 23 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index ae21a8c7f..3b33d938b 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -243,11 +243,18 @@ const configs = [ "unicorn/consistent-boolean-name": "off", "unicorn/consistent-class-member-order": "off", "unicorn/consistent-compound-words": "off", + "unicorn/consistent-conditional-object-spread": ["error", "ternary"], "unicorn/consistent-destructuring": "off", "unicorn/consistent-function-scoping": "off", "unicorn/consistent-json-file-read": ["error", "buffer"], + "unicorn/default-export-style": "off", "unicorn/escape-case": "off", - "unicorn/filename-case": ["error", { checkDirectories: false }], + "unicorn/filename-case": [ + "error", + { + checkDirectories: false, + }, + ], "unicorn/import-style": "off", "unicorn/logical-assignment-operators": [ "error", @@ -255,6 +262,7 @@ const configs = [ { enforceForIfStatements: true }, ], "unicorn/max-nested-calls": "off", + "unicorn/name-replacements": "off", "unicorn/no-array-callback-reference": "off", "unicorn/no-array-method-this-argument": "off", "unicorn/no-array-reduce": "off", @@ -281,18 +289,13 @@ const configs = [ "unicorn/no-top-level-assignment-in-function": "off", "unicorn/no-top-level-side-effects": "off", "unicorn/no-undeclared-class-members": "off", + "unicorn/no-unnecessary-boolean-comparison": "off", "unicorn/no-unreadable-array-destructuring": "off", "unicorn/no-unreadable-for-of-expression": "off", "unicorn/no-unreadable-new-expression": "off", "unicorn/no-unreadable-object-destructuring": "off", "unicorn/no-unsafe-string-replacement": "off", "unicorn/no-useless-concat": "off", - "unicorn/no-useless-fallback-in-spread": [ - "error", - { - checkTernary: false, - }, - ], "unicorn/no-useless-recursion": "off", "unicorn/no-useless-switch-case": "off", "unicorn/no-useless-undefined": [ @@ -317,7 +320,9 @@ const configs = [ }, ], "unicorn/prefer-await": "off", + "unicorn/prefer-boolean-return": "off", "unicorn/prefer-code-point": "off", + "unicorn/prefer-continue": "off", "unicorn/prefer-dom-node-append": "off", "unicorn/prefer-dom-node-remove": "off", "unicorn/prefer-early-return": "off", @@ -345,7 +350,6 @@ const configs = [ "unicorn/prefer-short-arrow-method": "off", "unicorn/prefer-ternary": "off", "unicorn/prefer-unicode-code-point-escapes": "off", - "unicorn/prevent-abbreviations": "off", "unicorn/relative-url-style": "off", "unicorn/require-array-sort-compare": "off", "unicorn/switch-case-braces": ["error", "avoid"], @@ -561,18 +565,16 @@ const configs = [ { files: ["src/document/printer/printer.js"], rules: { - "unicorn/prevent-abbreviations": [ + "unicorn/name-replacements": [ "error", - { replacements: { doc: false } }, + { + replacements: { + doc: false, + }, + }, ], }, }, - { - files: ["src/language-js/utilities/utilities.js"], - rules: { - "unicorn/prefer-export-from": ["error", { ignoreUsedVariables: false }], - }, - }, ]; export default configs; diff --git a/package.json b/package.json index 56da51a67..fb935ac94 100644 --- a/package.json +++ b/package.json @@ -160,7 +160,7 @@ "eslint-plugin-n": "18.1.0", "eslint-plugin-regexp": "3.1.0", "eslint-plugin-simple-import-sort": "13.0.0", - "eslint-plugin-unicorn": "67.0.0", + "eslint-plugin-unicorn": "68.0.0", "esm-utils": "4.4.2", "get-port": "7.2.0", "gfm-test-suite": "0.0.2", diff --git a/tests/integration/__tests__/patterns-dirs.js b/tests/integration/__tests__/patterns-dirs.js index 683238305..c2b05b007 100644 --- a/tests/integration/__tests__/patterns-dirs.js +++ b/tests/integration/__tests__/patterns-dirs.js @@ -382,7 +382,7 @@ function testPatterns( describe(testName, () => { runCliWithoutGitignore(cwd, [...cliArgs, "-l"]).test({ write: [], - ...(!("status" in expected) && { stderr: "", status: 1 }), + ...("status" in expected ? {} : { stderr: "", status: 1 }), ...expected, }); }); diff --git a/yarn.lock b/yarn.lock index faa274b7b..d04814657 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4509,9 +4509,9 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-unicorn@npm:67.0.0": - version: 67.0.0 - resolution: "eslint-plugin-unicorn@npm:67.0.0" +"eslint-plugin-unicorn@npm:68.0.0": + version: 68.0.0 + resolution: "eslint-plugin-unicorn@npm:68.0.0" dependencies: "@babel/helper-validator-identifier": "npm:^7.29.7" "@eslint-community/eslint-utils": "npm:^4.9.1" @@ -4531,7 +4531,7 @@ __metadata: strip-indent: "npm:^4.1.1" peerDependencies: eslint: ">=10.4" - checksum: 10/71d786c328c24fd06e622930c80b3e4bd80da4b3367bb2ee087cd8ecfcb740a699ec0ba71cb259a65e515f83117bb9710836941d07f05ae9a1719ecad6bfe50b + checksum: 10/361ca152c589dfc0385006b637d863c9a028275a2fcd44881280c18c207f45f1c7f8b0432078d5e53c5af986f384be7ccbd64d002ee372a2128ab4c370752274 languageName: node linkType: hard @@ -8151,7 +8151,7 @@ __metadata: eslint-plugin-n: "npm:18.1.0" eslint-plugin-regexp: "npm:3.1.0" eslint-plugin-simple-import-sort: "npm:13.0.0" - eslint-plugin-unicorn: "npm:67.0.0" + eslint-plugin-unicorn: "npm:68.0.0" esm-utils: "npm:4.4.2" espree: "npm:11.2.0" fast-glob: "npm:3.3.3"