diff --git a/.eslintrc.json b/.eslintrc.json index 7384fd7d..3e2c8895 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -28,6 +28,7 @@ "@typescript-eslint", "import", "jest", + "no-relative-import-paths", "prettier", "promise", "react", @@ -109,6 +110,7 @@ "no-implicit-coercion": "error", "no-new-wrappers": "error", "no-plusplus": "off", + "no-relative-import-paths/no-relative-import-paths": "error", "no-restricted-syntax": [ "error", "ForInStatement", diff --git a/components/system/Taskbar/Search/ResultEntry.tsx b/components/system/Taskbar/Search/ResultEntry.tsx index 7c04de18..4473f092 100644 --- a/components/system/Taskbar/Search/ResultEntry.tsx +++ b/components/system/Taskbar/Search/ResultEntry.tsx @@ -1,7 +1,7 @@ import { basename, extname } from "path"; import { useEffect, useMemo, useRef, useState } from "react"; import type Stats from "browserfs/dist/node/core/node_fs_stats"; -import useResultsContextMenu from "./useResultsContextMenu"; +import useResultsContextMenu from "components/system/Taskbar/Search/useResultsContextMenu"; import { useIsVisible } from "components/apps/Messenger/hooks"; import { getModifiedTime } from "components/system/Files/FileEntry/functions"; import { UNKNOWN_ICON } from "components/system/Files/FileManager/icons"; diff --git a/components/system/Taskbar/Search/useResultsContextMenu.ts b/components/system/Taskbar/Search/useResultsContextMenu.ts index 37061049..4deb81f7 100644 --- a/components/system/Taskbar/Search/useResultsContextMenu.ts +++ b/components/system/Taskbar/Search/useResultsContextMenu.ts @@ -1,6 +1,6 @@ import { dirname } from "path"; import { useMemo } from "react"; -import { OpenFolder } from "./Icons"; +import { OpenFolder } from "components/system/Taskbar/Search/Icons"; import { useMenu } from "contexts/menu"; import { type ContextMenuCapture } from "contexts/menu/useMenuContextState"; import { useProcesses } from "contexts/process"; diff --git a/package.json b/package.json index 5d52f8ef..0d01ccc0 100644 --- a/package.json +++ b/package.json @@ -105,6 +105,7 @@ "eslint-plugin-import": "^2.29.0", "eslint-plugin-jest": "^27.6.0", "eslint-plugin-jsx-a11y": "^6.8.0", + "eslint-plugin-no-relative-import-paths": "^1.5.3", "eslint-plugin-playwright": "^0.18.0", "eslint-plugin-prettier": "^5.0.1", "eslint-plugin-promise": "^6.1.1", diff --git a/yarn.lock b/yarn.lock index 4ab0fe92..99687fbc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3080,6 +3080,11 @@ eslint-plugin-jsx-a11y@^6.7.1, eslint-plugin-jsx-a11y@^6.8.0: object.entries "^1.1.7" object.fromentries "^2.0.7" +eslint-plugin-no-relative-import-paths@^1.5.3: + version "1.5.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-no-relative-import-paths/-/eslint-plugin-no-relative-import-paths-1.5.3.tgz#8c7fa79aa5ba10da0d8d79ce973c6db37385cb0d" + integrity sha512-z7c7Km1U0zdLyPziWeRKSsN2mPaGaBHDjfXn98B8XjRIhFi2bPqduRYcxWih1kI5al5tQtiChXVmspLkB0wNsQ== + eslint-plugin-playwright@^0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/eslint-plugin-playwright/-/eslint-plugin-playwright-0.18.0.tgz#90831b969eee270b325ed1b19d07e3b3ac3498e8"