From 4303492c0b4e49ab106cbf3fd6a52e72f53a5745 Mon Sep 17 00:00:00 2001 From: mrholek Date: Fri, 12 Jun 2026 22:48:33 +0200 Subject: [PATCH] chore(eslint): disable unicorn autofix rules that break TS typing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same guard as coreui-vue: these unicorn autofixes produce type-breaking rewrites in this codebase, so turn them off to keep `eslint --fix` safe. The lib already trips prefer-at (6), prefer-spread (8) and prefer-global-this (23). - prefer-at — .at(i) returns T | undefined where arr[i] returns T - prefer-spread — Array.from(NodeList) -> [...] narrows HTMLElement[] to Element[] - no-useless-undefined — () => undefined becomes () => {} (void) - prefer-global-this — window -> globalThis rewrite known to break code --- eslint.config.mjs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eslint.config.mjs b/eslint.config.mjs index 93fe87de..371d686d 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -48,9 +48,13 @@ export default typescriptEslint.config( 'unicorn/filename-case': 'off', 'unicorn/no-array-for-each': 'off', 'unicorn/no-null': 'off', + 'unicorn/no-useless-undefined': 'off', + 'unicorn/prefer-at': 'off', 'unicorn/prefer-dom-node-append': 'off', 'unicorn/prefer-export-from': 'off', + 'unicorn/prefer-global-this': 'off', 'unicorn/prefer-query-selector': 'off', + 'unicorn/prefer-spread': 'off', 'unicorn/prevent-abbreviations': 'off', 'vue/require-default-prop': 'off', },