From 68a5ec1403be1a68bac51cb391944c939f5ce191 Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Sat, 13 Jun 2026 19:15:41 +0200 Subject: [PATCH] Upgrade `eslint-plugin-unicorn` to version 65.0.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a major version bump, but the changelog at https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v65.0.0 doesn't indicate any breaking changes that should impact us. However, there is one false positive, possibly introduced by patch https://github.com/sindresorhus/eslint-plugin-unicorn/pull/3028: ``` src/core/xfa/factory.js 104:54 error Prefer `.some(…)` over `.find(…)` unicorn/prefer-array-some ``` This is incorrect because on this line we're not dealing with an array but with a `FontFinder` instance instead (and that doesn't have a `.some()` method), so we ignore the rule for this line. --- package-lock.json | 57 +++++++++++++---------------------------- package.json | 2 +- src/core/xfa/factory.js | 1 + 3 files changed, 20 insertions(+), 40 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2d9488ff2..34867c4b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,7 +32,7 @@ "eslint-plugin-perfectionist": "^5.9.0", "eslint-plugin-prettier": "^5.5.6", "eslint-plugin-regexp": "^3.1.0", - "eslint-plugin-unicorn": "^64.0.0", + "eslint-plugin-unicorn": "^65.0.1", "globals": "^17.6.0", "gulp": "^5.0.1", "gulp-cli": "^3.1.0", @@ -4365,29 +4365,6 @@ "node": ">=8" } }, - "node_modules/clean-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz", - "integrity": "sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^1.0.5" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/clean-regexp/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/cli-cursor": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", @@ -4768,6 +4745,19 @@ "node": ">=0.10.0" } }, + "node_modules/detect-indent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-7.0.2.tgz", + "integrity": "sha512-y+8xyqdGLL+6sh0tVeHcfP/QDd8gUgbasolJJpY7NgeQGSZ739bDtSiaiDgtoicy+mtYB81dKLxO9xRhCyIB3A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/devtools-protocol": { "version": "0.0.1624250", "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1624250.tgz", @@ -5292,9 +5282,9 @@ } }, "node_modules/eslint-plugin-unicorn": { - "version": "64.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-64.0.0.tgz", - "integrity": "sha512-rNZwalHh8i0UfPlhNwg5BTUO1CMdKNmjqe+TgzOTZnpKoi8VBgsW7u9qCHIdpxEzZ1uwrJrPF0uRb7l//K38gA==", + "version": "65.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-65.0.1.tgz", + "integrity": "sha512-daCrQrgxOoOz2uMPWB3Y3vvv/5q+ncwICI8IjoebiwtW87CaY4tAN5EEiRXTYVnf7qi1v1BGBdHOSnZLV0rx6A==", "dev": true, "license": "MIT", "dependencies": { @@ -5302,15 +5292,14 @@ "@eslint-community/eslint-utils": "^4.9.1", "change-case": "^5.4.4", "ci-info": "^4.4.0", - "clean-regexp": "^1.0.0", "core-js-compat": "^3.49.0", + "detect-indent": "^7.0.2", "find-up-simple": "^1.0.1", "globals": "^17.4.0", "indent-string": "^5.0.0", "is-builtin-module": "^5.0.0", "jsesc": "^3.1.0", "pluralize": "^8.0.0", - "regexp-tree": "^0.1.27", "regjsparser": "^0.13.0", "semver": "^7.7.4", "strip-indent": "^4.1.1" @@ -8764,16 +8753,6 @@ "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, - "node_modules/regexp-tree": { - "version": "0.1.27", - "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", - "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", - "dev": true, - "license": "MIT", - "bin": { - "regexp-tree": "bin/regexp-tree" - } - }, "node_modules/regexpu-core": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.4.0.tgz", diff --git a/package.json b/package.json index 6665cde72..f51ca4401 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "eslint-plugin-perfectionist": "^5.9.0", "eslint-plugin-prettier": "^5.5.6", "eslint-plugin-regexp": "^3.1.0", - "eslint-plugin-unicorn": "^64.0.0", + "eslint-plugin-unicorn": "^65.0.1", "globals": "^17.6.0", "gulp": "^5.0.1", "gulp-cli": "^3.1.0", diff --git a/src/core/xfa/factory.js b/src/core/xfa/factory.js index 930b8a071..f9ede693a 100644 --- a/src/core/xfa/factory.js +++ b/src/core/xfa/factory.js @@ -101,6 +101,7 @@ class XFAFactory { const missingFonts = []; for (let typeface of this.form[$globalData].usedTypefaces) { typeface = stripQuotes(typeface); + // eslint-disable-next-line unicorn/prefer-array-some const font = this.form[$globalData].fontFinder.find(typeface); if (!font) { missingFonts.push(typeface);