From 317c268be1e86d625478b0cde45987b9828779cf Mon Sep 17 00:00:00 2001 From: Todd Schiller Date: Mon, 22 Jun 2026 10:15:05 -0400 Subject: [PATCH] Disable unicorn/max-nested-calls From #279. The call-depth cap (max 3) fires only on the two places this repo nests deeply on purpose, both of which read better nested than split into temporaries: - zod schema builders, e.g. `z.record(z.string(), z.union([z.string(), z.number()]))` - fast-check generators in property tests, e.g. `fc.array(fc.tuple(fc.nat(20), fc.integer({ min: 1, max: 20 })))` No path to `error` without contorting idiomatic builder/combinator code, so turn it off rather than leave standing warnings. Refs #279 Co-Authored-By: Claude Opus 4.8 (1M context) --- extension/eslint.config.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/extension/eslint.config.js b/extension/eslint.config.js index ee9caf8..22e74c4 100644 --- a/extension/eslint.config.js +++ b/extension/eslint.config.js @@ -222,6 +222,12 @@ export default tseslint.config( "unicorn/no-computed-property-existence-check": "off", "unicorn/prefer-await": "off", "unicorn/no-top-level-side-effects": "off", + // max-nested-calls — the call-depth cap doesn't fit the two places we + // nest deeply on purpose: zod schema builders + // (`z.record(z.string(), z.union([z.string(), z.number()]))`) and + // fast-check generators (`fc.array(fc.tuple(fc.nat(…), …))`). Both + // are idiomatic and read better nested than split into temporaries. + "unicorn/max-nested-calls": "off", // Enforced (recommended `error`). Dynamically-built arrays pass an // explicit comparator; the only sites carrying a scoped `eslint-disable` @@ -236,7 +242,6 @@ export default tseslint.config( // Warn — ratchet to error in #279: "unicorn/prefer-scoped-selector": "warn", "unicorn/no-break-in-nested-loop": "warn", - "unicorn/max-nested-calls": "warn", "unicorn/prefer-number-coercion": "warn", "unicorn/prefer-uint8array-base64": "warn", // no-global-object-property-assignment stays at its recommended `error`