From 21c73db516b260b4b1ff6df779e363ba6e73205a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Mon, 7 Oct 2024 10:29:40 +0800 Subject: [PATCH] feat: enable unicorn `consistent-existence-index-check` & `prefer-math-min-max` --- src/configs/unicorn.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/configs/unicorn.ts b/src/configs/unicorn.ts index 66530a5..60c4559 100644 --- a/src/configs/unicorn.ts +++ b/src/configs/unicorn.ts @@ -10,6 +10,7 @@ export const unicorn: Config[] = [ rules: { 'unicorn/catch-error-name': 'error', 'unicorn/consistent-empty-array-spread': 'error', + 'unicorn/consistent-existence-index-check': 'error', 'unicorn/consistent-function-scoping': [ 'error', { checkArrowFunctions: false }, @@ -59,6 +60,7 @@ export const unicorn: Config[] = [ 'unicorn/prefer-dom-node-text-content': 'error', 'unicorn/prefer-includes': 'error', 'unicorn/prefer-keyboard-event-key': 'error', + 'unicorn/prefer-math-min-max': 'error', 'unicorn/prefer-math-trunc': 'error', 'unicorn/prefer-modern-dom-apis': 'error', 'unicorn/prefer-modern-math-apis': 'error',