diff --git a/.eslintrc.json b/.eslintrc.json index 9a303d16..f203583c 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -114,7 +114,6 @@ "react/hook-use-state": "error", "react-hooks/exhaustive-deps": "error", "react/jsx-filename-extension": ["error", { "extensions": [".tsx"] }], - "react/jsx-no-useless-fragment": "off", "react/jsx-props-no-spreading": "off", "react/jsx-sort-props": [ "error", diff --git a/components/apps/FileExplorer/index.tsx b/components/apps/FileExplorer/index.tsx index c837d03d..c9be1317 100644 --- a/components/apps/FileExplorer/index.tsx +++ b/components/apps/FileExplorer/index.tsx @@ -81,9 +81,8 @@ const FileExplorer: FC = ({ id }) => { - ) : ( - <> - ); + ) : // eslint-disable-next-line unicorn/no-null + null; }; export default FileExplorer; diff --git a/components/system/Menu/index.tsx b/components/system/Menu/index.tsx index 0ed1c8ce..23054516 100644 --- a/components/system/Menu/index.tsx +++ b/components/system/Menu/index.tsx @@ -133,9 +133,8 @@ const Menu: FC = ({ subMenu }) => { ))} - ) : ( - <> - ); + ) : // eslint-disable-next-line unicorn/no-null + null; }; export default Menu; diff --git a/components/system/Taskbar/Clock/index.tsx b/components/system/Taskbar/Clock/index.tsx index 91572bcd..8a3368a5 100644 --- a/components/system/Taskbar/Clock/index.tsx +++ b/components/system/Taskbar/Clock/index.tsx @@ -156,7 +156,8 @@ const Clock: FC = () => { } }, [currentWorker, supportsOffscreenCanvas]); - if (!time) return <>; + // eslint-disable-next-line unicorn/no-null + if (!time) return null; return ( = ({ id }) => { - ) : ( - <> - ); + ) : // eslint-disable-next-line unicorn/no-null + null; }; export default PeekWindow; diff --git a/styles/common/Icon.tsx b/styles/common/Icon.tsx index a71f65da..fd41fe63 100644 --- a/styles/common/Icon.tsx +++ b/styles/common/Icon.tsx @@ -117,7 +117,8 @@ const Icon = forwardRef< failedUrls.length > 0 && failedUrls.includes(srcSet.split(" ")[0]) ) { - return <>; + // eslint-disable-next-line unicorn/no-null + return null; } return ( diff --git a/utils/types.d.ts b/utils/types.d.ts index 21d3ce48..c74c3f22 100644 --- a/utils/types.d.ts +++ b/utils/types.d.ts @@ -4,7 +4,7 @@ type FC> = ( props: React.PropsWithChildren -) => JSX.Element; +) => JSX.Element | null; type HTMLElementWithPriority = T & { fetchPriority?: "auto" | "high" | "low";