From 536a54a29f5d791f320dae73d5d822821d5f75fa Mon Sep 17 00:00:00 2001 From: Caner Akdas Date: Sun, 8 Jun 2025 20:24:38 +0300 Subject: [PATCH 1/3] chore: force object shorthand --- apps/site/app/[locale]/next-data/api-data/route.ts | 2 +- apps/site/app/[locale]/next-data/page-data/route.ts | 4 ++-- apps/site/app/[locale]/page.tsx | 8 ++++---- apps/site/components/withAvatarGroup.tsx | 6 +++--- apps/site/components/withBreadcrumbs.tsx | 4 +++- apps/site/components/withFooter.tsx | 5 ++++- apps/site/components/withNavBar.tsx | 4 ++-- apps/site/eslint.config.js | 4 ++-- apps/site/hooks/react-generic/useSiteNavigation.ts | 2 +- apps/site/i18n.tsx | 2 +- apps/site/layouts/Blog.tsx | 7 ++++++- .../generators/__tests__/websiteFeeds.test.mjs | 2 +- apps/site/next-data/generators/blogData.mjs | 11 +++++++++-- apps/site/next-data/generators/releaseData.mjs | 8 ++++---- apps/site/next-data/generators/websiteFeeds.mjs | 11 ++++++----- apps/site/next.calendar.mjs | 4 ++-- apps/site/next.dynamic.mjs | 8 ++++---- apps/site/next.mdx.use.mjs | 10 +++++----- apps/site/next.rewrites.mjs | 4 ++-- apps/site/reducers/releaseReducer.ts | 11 ++++++----- apps/site/scripts/orama-search/get-documents.mjs | 2 +- eslint.config.js | 5 +++-- packages/i18n/eslint.config.js | 4 ++-- packages/rehype-shiki/src/highlighter.mjs | 12 ++++++------ packages/rehype-shiki/src/plugin.mjs | 2 +- .../Common/BasePagination/useGetPageElements.tsx | 8 ++++---- packages/ui-components/Common/Select/index.tsx | 5 ++++- packages/ui-components/Containers/Sidebar/index.tsx | 2 +- packages/ui-components/eslint.config.js | 4 ++-- .../stylelint/one-utility-class-per-line.mjs | 2 +- 30 files changed, 93 insertions(+), 70 deletions(-) diff --git a/apps/site/app/[locale]/next-data/api-data/route.ts b/apps/site/app/[locale]/next-data/api-data/route.ts index de008a59739b0..27b00d2bdae3f 100644 --- a/apps/site/app/[locale]/next-data/api-data/route.ts +++ b/apps/site/app/[locale]/next-data/api-data/route.ts @@ -48,7 +48,7 @@ export const GET = async () => { const deflatedSource = deflateSync(cleanedContent).toString('base64'); return { - filename, + filename: filename, pathname: getPathnameForApiFile(name, versionWithPrefix), content: deflatedSource, }; diff --git a/apps/site/app/[locale]/next-data/page-data/route.ts b/apps/site/app/[locale]/next-data/page-data/route.ts index d7e9fdd09efd4..08fe71d48e610 100644 --- a/apps/site/app/[locale]/next-data/page-data/route.ts +++ b/apps/site/app/[locale]/next-data/page-data/route.ts @@ -35,7 +35,7 @@ export const GET = async () => { const cleanedContent = parseRichTextIntoPlainText(matter(source).content); // Deflates a String into a base64 string-encoded (zlib compressed) - const deflatedSource = deflateSync(cleanedContent).toString('base64'); + const content = deflateSync(cleanedContent).toString('base64'); // Returns metadata of each page available on the Website return { @@ -43,7 +43,7 @@ export const GET = async () => { pathname, title, description, - content: deflatedSource, + content, }; }); diff --git a/apps/site/app/[locale]/page.tsx b/apps/site/app/[locale]/page.tsx index 624e7e1afe598..7e54ad9d66fc4 100644 --- a/apps/site/app/[locale]/page.tsx +++ b/apps/site/app/[locale]/page.tsx @@ -134,11 +134,11 @@ const getPage: FC = async props => { // Metadata and shared Context to be available through the lifecycle of the page const sharedContext = { - frontmatter, - headings, + frontmatter: frontmatter, + headings: headings, pathname: `/${pathname}`, - readingTime, - filename, + readingTime: readingTime, + filename: filename, }; // Defines a shared Server Context for the Client-Side diff --git a/apps/site/components/withAvatarGroup.tsx b/apps/site/components/withAvatarGroup.tsx index fc0569877c50f..b034aa78f59ea 100644 --- a/apps/site/components/withAvatarGroup.tsx +++ b/apps/site/components/withAvatarGroup.tsx @@ -21,9 +21,9 @@ const WithAvatarGroup: FC = ({ }) => ( = ({ navKeys = [] }) => { // Goes deeper on the tree of items if there are any. currentNode = items; - return label ? [...breadcrumbs, { label, href: link }] : breadcrumbs; + return label + ? [...breadcrumbs, { label: label, href: link }] + : breadcrumbs; } return breadcrumbs; diff --git a/apps/site/components/withFooter.tsx b/apps/site/components/withFooter.tsx index 8bf75ac402940..5f5407fbe277d 100644 --- a/apps/site/components/withFooter.tsx +++ b/apps/site/components/withFooter.tsx @@ -20,7 +20,10 @@ const WithFooter: FC = () => { // Add OpenJS link updatedFooterLinks.push(footerLinks.at(-1)!); - const navigation = { socialLinks, footerLinks: updatedFooterLinks }; + const navigation = { + socialLinks: socialLinks, + footerLinks: updatedFooterLinks, + }; return