Skip to content

Commit

Permalink
♻️ eslint import-access/jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
miyasan31 committed Oct 16, 2022
1 parent 4f104a9 commit d7b94a3
Show file tree
Hide file tree
Showing 17 changed files with 62 additions and 11 deletions.
3 changes: 3 additions & 0 deletions src/components/page/common/404/404.page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { Link } from "~/components/lib/router/Link";
import { successButton } from "~/constants/buttonColor";

/**
* @package
*/
export const NotFound = () => {
return (
<main className="p-4 text-white bg-red-600">
Expand Down
3 changes: 3 additions & 0 deletions src/components/page/private/Main/Main.page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @package
*/
export const Main = () => {
return <div>main</div>;
};
3 changes: 3 additions & 0 deletions src/components/page/public/About/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { Head } from "~/components/lib/react-helmet-async/Head";
import { About } from "~/components/page/public/About/About.page";

/**
* @package
*/
const AboutPage = () => {
return (
<>
Expand Down
3 changes: 3 additions & 0 deletions src/components/page/public/NestOne/NestOne.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { Link } from "~/components/lib/router/Link";
import { Outlet } from "~/components/lib/router/Outlet";
import { errorButton, successButton } from "~/constants/buttonColor";

/**
* @package
*/
export const NestOne = () => {
return (
<main className="p-4 bg-slate-700">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import { postService } from "~/services/post.service";

const { useGetPostDetail } = postService;

/**
* @package
*/
export const NestPostDetail = () => {
const { postId } = useParams();
const { data } = useGetPostDetail(String(postId), { enabled: !!postId });
Expand Down
3 changes: 3 additions & 0 deletions src/components/page/public/NestPosts/NestPosts.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import { postService } from "~/services/post.service";

const { useGetPostList } = postService;

/**
* @package
*/
export const NestPosts = () => {
const { data } = useGetPostList();

Expand Down
3 changes: 3 additions & 0 deletions src/components/page/public/NestThree/NestThree.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { Link } from "~/components/lib/router/Link";
import { Outlet } from "~/components/lib/router/Outlet";
import { successButton } from "~/constants/buttonColor";

/**
* @package
*/
export const NestThree = () => {
return (
<main className="p-4 bg-slate-300">
Expand Down
3 changes: 3 additions & 0 deletions src/components/page/public/NestTwo/NestTwo.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { Link } from "~/components/lib/router/Link";
import { Outlet } from "~/components/lib/router/Outlet";
import { errorButton, successButton } from "~/constants/buttonColor";

/**
* @package
*/
export const NestTwo = () => {
return (
<main className="p-4 bg-slate-500">
Expand Down
3 changes: 3 additions & 0 deletions src/components/page/public/PostDetail/PostDetail.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import { postService } from "~/services/post.service";

const { useGetPostDetail } = postService;

/**
* @package
*/
export const PostDetail = () => {
const { postId } = useParams();
const { data } = useGetPostDetail(String(postId), { enabled: !!postId });
Expand Down
3 changes: 3 additions & 0 deletions src/components/page/public/Posts/Posts.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { postService } from "~/services/post.service";

const { useGetPostList } = postService;

/**
* @package
*/
export const Posts = () => {
const { data } = useGetPostList();

Expand Down
14 changes: 10 additions & 4 deletions src/components/provider/ErrorBoundary/Fallback/AppFallback.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import type { FC } from "react";

import type { ErrorFallbackProps } from "./ErrorFallbackProps";

const onReload = () => {
window.location.assign(window.location.origin);
type ErrorFallbackProps = {
error: Error;
resetErrorBoundary: () => void;
};

/**
* @package
*/
export const AppFallback: FC<ErrorFallbackProps> = ({ error }) => {
return (
<div role="alert">
Expand All @@ -15,3 +17,7 @@ export const AppFallback: FC<ErrorFallbackProps> = ({ error }) => {
</div>
);
};

const onReload = () => {
window.location.assign(window.location.origin);
};

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import type { FC } from "react";
import { useNavigate } from "react-router-dom";

import type { ErrorFallbackProps } from "./ErrorFallbackProps";
type ErrorFallbackProps = {
error: Error;
resetErrorBoundary: () => void;
};

/**
* @package
*/
export const LayoutFallback: FC<ErrorFallbackProps> = ({ error }) => {
const navigate = useNavigate();

Expand Down
8 changes: 6 additions & 2 deletions src/components/provider/ErrorBoundary/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import type { FC, ReactNode } from "react";
import { ErrorBoundary as ReactErrorBoundary } from "react-error-boundary";

import { LayoutFallback } from "./Fallback";
import type { ErrorFallbackProps } from "./Fallback/ErrorFallbackProps";
import { LayoutFallback } from "~/components/provider/ErrorBoundary/Fallback";

type ErrorFallbackProps = {
error: Error;
resetErrorBoundary: () => void;
};

type ErrorBoundaryProps = {
children: ReactNode;
Expand Down
3 changes: 3 additions & 0 deletions src/providers/ReactHelmetProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ type Props = {
children: ReactNode;
};

/**
* @package
*/
export const ReactHelmetProvider: FC<Props> = ({ children }) => {
return <HelmetProvider>{children}</HelmetProvider>;
};
3 changes: 3 additions & 0 deletions src/providers/ReactQueryProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ const queryClient = new QueryClient({
},
});

/**
* @package
*/
export const ReactQueryProvider: FC<Props> = ({ children }) => {
return (
<QueryClientProvider client={queryClient}>
Expand Down
3 changes: 3 additions & 0 deletions src/providers/ReactRouterProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ type Props = {
children: ReactNode;
};

/**
* @package
*/
export const ReactRouterProvider: FC<Props> = ({ children }) => {
return <BrowserRouter>{children}</BrowserRouter>;
};

0 comments on commit d7b94a3

Please sign in to comment.