From f897e7d11b4a6b483b8af27634b526bed1d69aae Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 20 Feb 2025 17:51:46 +0100 Subject: [PATCH] Enable @stylistic/js/array-bracket-spacing lint --- eslint.config.js | 1 + state.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/eslint.config.js b/eslint.config.js index f32fa3a..cdd1b9e 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -46,6 +46,7 @@ export default [ multiline: true, consistent: true, }], + "@stylistic/js/array-bracket-spacing": ["warn", "never"], "@stylistic/js/array-bracket-newline": ["warn", "consistent"], }, }, diff --git a/state.js b/state.js index 12de077..52ed1df 100644 --- a/state.js +++ b/state.js @@ -231,7 +231,7 @@ function insertMessage(list, msg) { } console.assert(insertBefore >= 0, ""); - list = [ ...list ]; + list = [...list]; list.splice(insertBefore, 0, msg); return list; }