diff --git a/www/docs/.eslintrc.js b/www/docs/.eslintrc.js index aa69f8b463..deef729441 100644 --- a/www/docs/.eslintrc.js +++ b/www/docs/.eslintrc.js @@ -81,6 +81,15 @@ module.exports = { ], "space-infix-ops": "error", "eol-last": ["error", "always"], + "no-console": [ + "error", + { + allow: [ + "error", + "warn" + ] + } + ] }, env: { es6: true, diff --git a/www/docs/src/providers/Sidebar/index.tsx b/www/docs/src/providers/Sidebar/index.tsx index c359f038f7..b3e2e7de37 100644 --- a/www/docs/src/providers/Sidebar/index.tsx +++ b/www/docs/src/providers/Sidebar/index.tsx @@ -6,7 +6,6 @@ import React, { useState, } from "react" import { prefersReducedMotion } from "@docusaurus/theme-common" -import useIsBrowser from "@docusaurus/useIsBrowser" type SidebarContextType = { hasSidebar: boolean diff --git a/www/docs/src/theme/DocPage/Layout/Sidebar/index.tsx b/www/docs/src/theme/DocPage/Layout/Sidebar/index.tsx index 3e72e657b6..71fa880da0 100644 --- a/www/docs/src/theme/DocPage/Layout/Sidebar/index.tsx +++ b/www/docs/src/theme/DocPage/Layout/Sidebar/index.tsx @@ -63,7 +63,6 @@ export default function DocPageLayoutSidebar({ }} onMouseUp={(e) => { const target = e.target as Element - console.log("here", target.classList) if ( target.classList.contains("menu__list-item") || target.parentElement.classList.contains("menu__list-item") diff --git a/www/docs/src/theme/DocPage/index.tsx b/www/docs/src/theme/DocPage/index.tsx index c4c384bc74..1e79849e76 100644 --- a/www/docs/src/theme/DocPage/index.tsx +++ b/www/docs/src/theme/DocPage/index.tsx @@ -1,10 +1,9 @@ -import React, { useCallback, useEffect, useState } from "react" +import React from "react" import clsx from "clsx" import { HtmlClassNameProvider, ThemeClassNames, PageMetadata, - prefersReducedMotion, } from "@docusaurus/theme-common" import { docVersionSearchTag, @@ -16,7 +15,6 @@ import DocPageLayout from "@theme/DocPage/Layout" import NotFound from "@theme/NotFound" import SearchMetadata from "@theme/SearchMetadata" import type { Props } from "@theme/DocPage" -import { SidebarContext } from "@site/src/context/sidebar" import SidebarProvider from "@site/src/providers/Sidebar" function DocPageMetadata(props: Props): JSX.Element { diff --git a/www/docs/src/theme/DocSidebar/Desktop/index.tsx b/www/docs/src/theme/DocSidebar/Desktop/index.tsx index d3dd77b414..d778287896 100644 --- a/www/docs/src/theme/DocSidebar/Desktop/index.tsx +++ b/www/docs/src/theme/DocSidebar/Desktop/index.tsx @@ -7,7 +7,7 @@ import useIsBrowser from "@docusaurus/useIsBrowser" import { useLocation } from "@docusaurus/router" import AnnouncementBar from "../../AnnouncementBar/index" -function DocSidebarDesktop({ path, sidebar, isHidden }: Props) { +function DocSidebarDesktop({ path, sidebar }: Props) { const { navbar: { hideOnScroll }, } = useThemeConfig() diff --git a/www/docs/src/types/index.d.ts b/www/docs/src/types/index.d.ts index 7b52979da7..0cd2cd0c2a 100644 --- a/www/docs/src/types/index.d.ts +++ b/www/docs/src/types/index.d.ts @@ -119,10 +119,10 @@ declare module "@medusajs/docs" { export declare type NavbarActionButton = NavbarActionBase & { type: "button" events?: { - onClick?: (e: any) => any - onMouseEnter?: (e: any) => any - onMouseLeave?: (e: any) => any - onMouseOver?: (e: any) => any + onClick?: (e: MouseEvent) => void + onMouseEnter?: (e: MouseEvent) => void + onMouseLeave?: (e: MouseEvent) => void + onMouseOver?: (e: MouseEvent) => void } }