From b464c37de337d02e6178487cb6a1c03b29f78822 Mon Sep 17 00:00:00 2001 From: jimmy-guzman Date: Sat, 13 Apr 2024 08:21:07 -0500 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20improve=20`curly`=20rule=20?= =?UTF-8?q?by=20adding=20consistency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/__snapshots__/factory.spec.ts.snap | 6 +++++- src/__snapshots__/index.spec.ts.snap | 6 +++++- src/rules/__snapshots__/base.spec.ts.snap | 6 +++++- src/rules/base.ts | 2 +- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/__snapshots__/factory.spec.ts.snap b/src/__snapshots__/factory.spec.ts.snap index 6cc9ce0..50e8797 100644 --- a/src/__snapshots__/factory.spec.ts.snap +++ b/src/__snapshots__/factory.spec.ts.snap @@ -10,7 +10,11 @@ exports[`jimmyDotCodes > should create default configuration 1`] = ` "always", ], "constructor-super": "error", - "curly": "error", + "curly": [ + "error", + "multi-or-nest", + "consistent", + ], "for-direction": "error", "getter-return": "error", "no-async-promise-executor": "error", diff --git a/src/__snapshots__/index.spec.ts.snap b/src/__snapshots__/index.spec.ts.snap index 1c604f2..f0e7906 100644 --- a/src/__snapshots__/index.spec.ts.snap +++ b/src/__snapshots__/index.spec.ts.snap @@ -10,7 +10,11 @@ exports[`should create default configuration 1`] = ` "always", ], "constructor-super": "error", - "curly": "error", + "curly": [ + "error", + "multi-or-nest", + "consistent", + ], "for-direction": "error", "getter-return": "error", "no-async-promise-executor": "error", diff --git a/src/rules/__snapshots__/base.spec.ts.snap b/src/rules/__snapshots__/base.spec.ts.snap index 67a3762..0073af2 100644 --- a/src/rules/__snapshots__/base.spec.ts.snap +++ b/src/rules/__snapshots__/base.spec.ts.snap @@ -7,7 +7,11 @@ exports[`should create base rules 1`] = ` "always", ], "constructor-super": "error", - "curly": "error", + "curly": [ + "error", + "multi-or-nest", + "consistent", + ], "for-direction": "error", "getter-return": "error", "no-async-promise-executor": "error", diff --git a/src/rules/base.ts b/src/rules/base.ts index a37d8fa..3401bdc 100644 --- a/src/rules/base.ts +++ b/src/rules/base.ts @@ -4,7 +4,7 @@ import { type Rules } from "../types"; export const baseRules = { ...eslint.configs.recommended.rules, - "curly": "error", + "curly": ["error", "multi-or-nest", "consistent"], "arrow-body-style": ["error", "always"], "object-shorthand": "error", "prefer-arrow-callback": "error",