From fec87d8d0c56c15c31305b032bb4c92647a33ec0 Mon Sep 17 00:00:00 2001 From: adjsky Date: Thu, 31 Oct 2024 21:57:01 +0300 Subject: [PATCH] chore(eslint-plugin): fmt --- eslint-plugin/rules/must_use_result.ts | 3 +-- eslint-plugin/rules/must_use_result_test.ts | 15 +++++---------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/eslint-plugin/rules/must_use_result.ts b/eslint-plugin/rules/must_use_result.ts index 1bd8899..66e1cbe 100644 --- a/eslint-plugin/rules/must_use_result.ts +++ b/eslint-plugin/rules/must_use_result.ts @@ -19,8 +19,7 @@ const rule = ruleCreator({ }, type: "problem", messages: { - mustUse: - "`Result` may be an `Err` variant, which should be handled.", + mustUse: "`Result` may be an `Err` variant, which should be handled.", }, schema: [], }, diff --git a/eslint-plugin/rules/must_use_result_test.ts b/eslint-plugin/rules/must_use_result_test.ts index f9d3eb6..718653d 100644 --- a/eslint-plugin/rules/must_use_result_test.ts +++ b/eslint-plugin/rules/must_use_result_test.ts @@ -145,8 +145,7 @@ tester.run("must-use-result", rule, { }, { - name: - "return a sync result in an async function, await and assign it", + name: "return a sync result in an async function, await and assign it", code: injectCode(` const okResult = await asyncGetOk() const errResult = await asyncGetErr() @@ -154,8 +153,7 @@ tester.run("must-use-result", rule, { }, { - name: - "return an async result in an async function, await and assign it", + name: "return an async result in an async function, await and assign it", code: injectCode(` const okAsyncResult = await asyncGetAsyncOk() const errAsyncResult = await asyncGetAsyncErr() @@ -174,8 +172,7 @@ tester.run("must-use-result", rule, { }, { - name: - "create results in an array expression, assigned to a variable", + name: "create results in an array expression, assigned to a variable", code: injectCode(` const _ = [ok(1), err(2), okAsync(3), errAsync(4)] `), @@ -222,8 +219,7 @@ tester.run("must-use-result", rule, { }, { - name: - "do stuff with results in logical expressions and assign them", + name: "do stuff with results in logical expressions and assign them", code: injectCode(` let someBool = false const _ = someBool ? ok(4) : err(2) @@ -286,8 +282,7 @@ tester.run("must-use-result", rule, { }, { - name: - "create a sync result using class constructor but don't assign it", + name: "create a sync result using class constructor but don't assign it", code: injectCode(` new Ok(5) new Err(5)