From 1f02cfec3d9160f42f473f5329462d016b993876 Mon Sep 17 00:00:00 2001 From: Dongsen Date: Thu, 9 Jun 2022 01:19:03 +0800 Subject: [PATCH 1/2] docs: remove unexpected 'as const' in incorrect example --- .../eslint-plugin/docs/rules/explicit-module-boundary-types.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md b/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md index 2b5aa6243542..51777c1e2cff 100644 --- a/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md +++ b/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md @@ -161,7 +161,7 @@ export const func = (value: number) => ({ type: 'X', value }); export const foo = () => ({ bar: true, - } as const); + }); export const bar = () => 1; ``` From 7219f24f4205178892fae37dccffd647158a6b9f Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Thu, 9 Jun 2022 18:00:40 -0700 Subject: [PATCH 2/2] Update explicit-module-boundary-types.md --- .../docs/rules/explicit-module-boundary-types.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md b/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md index 51777c1e2cff..b25350b60b97 100644 --- a/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md +++ b/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md @@ -158,10 +158,9 @@ Examples of code for this rule with `{ allowDirectConstAssertionInArrowFunctions ```ts export const func = (value: number) => ({ type: 'X', value }); -export const foo = () => - ({ - bar: true, - }); +export const foo = () => ({ + bar: true, +}); export const bar = () => 1; ```