From e41cbf4594a8176ed75699794a4c7172dd7b3fa3 Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Wed, 17 Jun 2026 06:29:15 +0800 Subject: [PATCH] Update ESLint config (#19393) --- eslint.config.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/eslint.config.js b/eslint.config.js index ddf27e6df..2d4581598 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -287,7 +287,12 @@ const configs = [ "unicorn/no-unreadable-object-destructuring": "off", "unicorn/no-unsafe-string-replacement": "off", "unicorn/no-useless-concat": "off", - "unicorn/no-useless-fallback-in-spread": "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": [ @@ -328,6 +333,13 @@ const configs = [ "unicorn/prefer-else-if": "off", "unicorn/prefer-includes-over-repeated-comparisons": "off", "unicorn/prefer-minimal-ternary": "off", + "unicorn/prefer-number-properties": [ + "error", + { + checkInfinity: true, + checkNaN: true, + }, + ], "unicorn/prefer-query-selector": "off", "unicorn/prefer-short-arrow-method": "off", "unicorn/prefer-ternary": "off",