Skip to content

Commit

Permalink
fix: make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
glenngillen committed Jan 14, 2025
1 parent 84dd41f commit d5e8d08
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/components/CustomTabs/useTabsWithHash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ type UseTabsWithHashProps = {

type UseTabsWithHashReturnType = {
tabIndex: number;
// eslint-disable-next-line no-unused-vars
handleTabsChange: (index: number) => void;
};

Expand Down Expand Up @@ -37,12 +38,12 @@ const useTabsWithHash = ({
if (typeof window === 'undefined') return;
window.history.pushState({}, '', `#${tabNameToSetAsCurrent}`);
},
[tabsNames]
[tabsNames],
);

useEffect(() => {
const currentTabNameBasedOnHash = tabsNames.find((value) =>
router.asPath.includes(`#${value}`)
router.asPath.includes(`#${value}`),
);
setCurrentTabName(currentTabNameBasedOnHash || '');
}, [router.asPath, tabsNames]);
Expand Down
1 change: 1 addition & 0 deletions src/components/RotatingText/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ type Props = {
const makeElements = (
words: string[],
styles?: CSSProperties,
// eslint-disable-next-line no-unused-vars
): ((props: AnimatedProps<{ style: CSSProperties }>) => React.ReactElement)[] =>
words.map(
(word) =>
Expand Down
2 changes: 1 addition & 1 deletion src/components/mdx/transition/Focus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const focus: AnnotationHandler = {
return <InnerPre merge={props} />;
},
Line: (props) => <FocusableLine merge={props} />,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
AnnotatedLine: ({ annotation, ...props }) => <FocusableLine merge={props} data-focus={true} />,
};

Expand Down
1 change: 1 addition & 0 deletions src/components/mdx/transition/Scroller.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const Scroller = ({
rootMargin,
children,
}: {
// eslint-disable-next-line no-unused-vars
onIndexChange: (index: number) => void;
triggerPosition?: TriggerPosition;
rootMargin?: string;
Expand Down
2 changes: 2 additions & 0 deletions src/contextProviders/BlogPostsProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ type BlogPostsContextType = {
groupedBlogPostsByCategory: GroupedBlogPosts;
searchPostsQuery: string;
searchPostsResult: BlogPost[];
// eslint-disable-next-line no-unused-vars
handleSetSearchPostsQuery: (value: string) => void;
handleRemoveSearchPostsQuery: () => void;
searchInputValue: string;
// eslint-disable-next-line no-unused-vars
handleSetSearchInputValue: (value: string) => void;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useBlogPostsContext } from '@contextProviders/BlogPostsProvider';
import { BLOG_PATH } from '@consts/paths';

const BlogLayoutSidebarSeeAllArticles: FunctionComponent<
// eslint-disable-next-line no-unused-vars
LinkProps & { setActiveIndex: (index: number) => void }
> = ({ setActiveIndex, ...restProps }) => {
const { handleRemoveSearchPostsQuery, searchPostsQuery } = useBlogPostsContext();
Expand Down
2 changes: 1 addition & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const App: FunctionComponent<AppPropsWithLayout> = (props) => {
Component,
pageProps: { ...pageProps },
} = props;
// eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/no-shadow,@typescript-eslint/no-unused-vars
// eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/no-shadow,@typescript-eslint/no-unused-vars, no-unused-vars
const { getLayout = (page: ReactElement, pageProps: any): ReactNode => page } = Component;
const isBrowser = typeof window !== 'undefined';
const [initialRouteTracked, setInitialRouteTracked] = useState(false);
Expand Down
1 change: 1 addition & 0 deletions src/typings/NextPageWithLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ import { NextPage } from 'next';

// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export type NextPageWithLayout<P = {}> = NextPage<P> & {
// eslint-disable-next-line no-unused-vars
getLayout?: (page: ReactElement) => ReactNode;
};
1 change: 1 addition & 0 deletions src/typings/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ declare global {
rdt?: any;
analytics?: any;
lintrk?: any;
// eslint-disable-next-line no-unused-vars
gtag?: (...args: any[]) => void;
}
}
3 changes: 2 additions & 1 deletion src/utils/copyTextToClipboard.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
async function copyTextToClipboard(
text: string,
setCopied: (value: boolean) => void
// eslint-disable-next-line no-unused-vars
setCopied: (value: boolean) => void,
): Promise<void> {
setCopied(true);
await navigator.clipboard.writeText(text);
Expand Down

0 comments on commit d5e8d08

Please sign in to comment.