From 93eac46b1d9da5492ce9265c30dd15239bdf70b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sun, 26 Oct 2025 13:22:31 +0100 Subject: [PATCH] lint: Enable 'prefer-const' rule Now that all code conforms with the rule, we can enforce it to make sure we stick to it with new code. Relax the rule for destructuring, so we don't have to jump through hoops to avoid "mixed" assignments. Part-of: --- tools/eslint.config.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/eslint.config.js b/tools/eslint.config.js index 27df2ce6..7ba281c2 100644 --- a/tools/eslint.config.js +++ b/tools/eslint.config.js @@ -20,6 +20,9 @@ export default defineConfig([ afterColon: true, }], 'prefer-arrow-callback': 'error', + 'prefer-const': ['error', { + destructuring: 'all', + }], 'jsdoc/require-param-description': 'off', 'jsdoc/require-jsdoc': ['error', { exemptEmptyFunctions: true,