From 4ee0f74361c40406e68be2c8edbb8c05487e7c0f Mon Sep 17 00:00:00 2001 From: Valtteri Kantanen Date: Tue, 19 Nov 2024 13:07:05 +0200 Subject: [PATCH] Add ESLint rule for 'prefer-const' https://eslint.org/docs/latest/rules/prefer-const --- eslint.config.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/eslint.config.mjs b/eslint.config.mjs index c9ea476601..956fedaaa5 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -82,6 +82,7 @@ export default [ 'no-return-assign': 'error', 'no-return-await': 'error', 'object-shorthand': ['error', 'always'], + 'prefer-const': 'error', 'prefer-destructuring': ['error', { VariableDeclarator: { object: true } }], quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: false }], 'react/display-name': 'off', // TODO: Delete this override