Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
60 changes: 47 additions & 13 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": [
"react",
"typescript",
"jsx-a11y",
"import",
"promise",
"unicorn",
"oxc"
],
"plugins": ["react", "typescript", "jsx-a11y", "import", "promise", "unicorn", "oxc"],
"categories": {
"correctness": "warn",
"suspicious": "warn",
Expand Down Expand Up @@ -44,7 +36,7 @@
"rules": {
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"unicorn/filename-case": "off",
"unicorn/filename-case": ["error", { "case": "kebabCase" }],
"unicorn/no-null": "off",
"unicorn/prevent-abbreviations": "off",
"no-unused-vars": [
Expand All @@ -60,9 +52,29 @@
},
"overrides": [
{
"files": [
"**/space/**"
],
"files": ["**/api/tools/**"],
"rules": {
"unicorn/filename-case": "off"
}
},
{
"files": ["**/core/**"],
"rules": {
"no-restricted-imports": [
"error",
{
"patterns": [
{
"group": ["@/app/**"],
"message": "core/ is the reusable layer: it must not import from app/, the route tree. Move the shared file into core/ instead."
}
]
}
]
}
},
{
"files": ["**/space/**"],
"rules": {
"no-restricted-imports": [
"error",
Expand All @@ -76,6 +88,28 @@
}
]
}
},
{
"files": ["**/space/core/**"],
"rules": {
"no-restricted-imports": [
"error",
{
"paths": [
{
"name": "@makeplane/propel/icons",
"message": "Import icons from @pace/propel/icons, which re-exports this set alongside the in-repo icons, so a call site never has to know which set an icon came from. apps/web joins this rule once the pull request that deletes its last 15 users of the old path has landed; apps/admin cannot, because it declares no @pace/propel dependency."
}
],
"patterns": [
{
"group": ["@/app/**"],
"message": "core/ is the reusable layer: it must not import from app/, the route tree. Move the shared file into core/ instead."
}
]
}
]
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { useState } from "react";
import { isEmpty } from "lodash-es";
import Link from "@/app/hooks/link";
import Link from "@/lib/navigation/link";
import { useForm } from "react-hook-form";
// pace internal packages
import { API_BASE_URL } from "@pace/constants";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import useSWR from "swr";
import { Switch } from "@makeplane/propel/components/switch";
import { useTranslation } from "@pace/i18n";
// assets
import giteaLogo from "@/app/assets/logos/gitea-logo.svg?url";
import giteaLogo from "@/assets/logos/gitea-logo.svg?url";
// components
import { AuthenticationMethodCard } from "@/components/authentication/authentication-method-card";
import { PageWrapper } from "@/components/common/page-wrapper";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { useState } from "react";
import { isEmpty } from "lodash-es";
import Link from "@/app/hooks/link";
import Link from "@/lib/navigation/link";
import { useForm } from "react-hook-form";
import { MonitorOutline } from "@makeplane/propel/icons";
// pace internal packages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import { Switch } from "@makeplane/propel/components/switch";
import { useTranslation } from "@pace/i18n";
import { resolveGeneralTheme } from "@pace/utils";
// assets
import githubLightModeImage from "@/app/assets/logos/github-black.png?url";
import githubDarkModeImage from "@/app/assets/logos/github-white.png?url";
import githubLightModeImage from "@/assets/logos/github-black.png?url";
import githubDarkModeImage from "@/assets/logos/github-white.png?url";
// components
import { AuthenticationMethodCard } from "@/components/authentication/authentication-method-card";
import { PageWrapper } from "@/components/common/page-wrapper";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { useState } from "react";
import { isEmpty } from "lodash-es";
import Link from "@/app/hooks/link";
import Link from "@/lib/navigation/link";
import { useForm } from "react-hook-form";
// pace internal packages
import { API_BASE_URL } from "@pace/constants";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Switch } from "@makeplane/propel/components/switch";
// pace internal packages
import { useTranslation } from "@pace/i18n";
// assets
import GitlabLogo from "@/app/assets/logos/gitlab-logo.svg?url";
import GitlabLogo from "@/assets/logos/gitlab-logo.svg?url";
// components
import { AuthenticationMethodCard } from "@/components/authentication/authentication-method-card";
import { PageWrapper } from "@/components/common/page-wrapper";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { useState } from "react";
import { isEmpty } from "lodash-es";
import Link from "@/app/hooks/link";
import Link from "@/lib/navigation/link";
import { useForm } from "react-hook-form";
import { MonitorOutline } from "@makeplane/propel/icons";
// pace internal packages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Switch } from "@makeplane/propel/components/switch";
// pace internal packages
import { useTranslation } from "@pace/i18n";
// assets
import GoogleLogo from "@/app/assets/logos/google-logo.svg?url";
import GoogleLogo from "@/assets/logos/google-logo.svg?url";
// components
import { AuthenticationMethodCard } from "@/components/authentication/authentication-method-card";
import { PageWrapper } from "@/components/common/page-wrapper";
Expand Down
2 changes: 1 addition & 1 deletion apps/admin/app/(all)/(dashboard)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { useEffect } from "react";
import { observer } from "mobx-react";
import { useRouter } from "@/app/hooks/navigation";
import { useRouter } from "@/lib/navigation";
import { Outlet } from "react-router";
// components
import { AdminHeader } from "@/components/common/header";
Expand Down
2 changes: 1 addition & 1 deletion apps/admin/app/(all)/(dashboard)/sidebar-help-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { useState, useRef } from "react";
import { observer } from "mobx-react";
import Link from "@/app/hooks/link";
import Link from "@/lib/navigation/link";
import { Transition } from "@headlessui/react";
import { DOCS_URL, FORUM_URL, WEB_BASE_URL } from "@pace/constants";
// pace internal packages
Expand Down
4 changes: 2 additions & 2 deletions apps/admin/app/(all)/(dashboard)/sidebar-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/

import { observer } from "mobx-react";
import Link from "@/app/hooks/link";
import { usePathname } from "@/app/hooks/navigation";
import Link from "@/lib/navigation/link";
import { usePathname } from "@/lib/navigation";
// pace internal packages
import { Tooltip } from "@makeplane/propel/components/tooltip";
import { useTranslation } from "@pace/i18n";
Expand Down
4 changes: 2 additions & 2 deletions apps/admin/app/(all)/(dashboard)/workspace/create/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/

import { useState, useEffect } from "react";
import Link from "@/app/hooks/link";
import { useRouter } from "@/app/hooks/navigation";
import Link from "@/lib/navigation/link";
import { useRouter } from "@/lib/navigation";
import { Controller, useForm } from "react-hook-form";
// pace imports
import { WEB_BASE_URL, ORGANIZATION_SIZE, RESTRICTED_URLS } from "@pace/constants";
Expand Down
2 changes: 1 addition & 1 deletion apps/admin/app/(all)/(dashboard)/workspace/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { useState } from "react";
import { observer } from "mobx-react";
import Link from "@/app/hooks/link";
import Link from "@/lib/navigation/link";
import useSWR from "swr";
import { LoadingOutline as LoaderIcon } from "@makeplane/propel/icons";
// types
Expand Down
2 changes: 1 addition & 1 deletion apps/admin/app/(all)/(home)/auth-helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* See the LICENSE file for details.
*/

import Link from "@/app/hooks/link";
import Link from "@/lib/navigation/link";
// pace packages
import type { TAdminAuthErrorInfo } from "@pace/constants";
import { SUPPORT_EMAIL, EAdminAuthErrorCodes } from "@pace/constants";
Expand Down
2 changes: 1 addition & 1 deletion apps/admin/app/(all)/(home)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { useEffect } from "react";
import { observer } from "mobx-react";
import { useRouter } from "@/app/hooks/navigation";
import { useRouter } from "@/lib/navigation";
import { Outlet } from "react-router";
// hooks
import { useUser } from "@/hooks/store/use-user";
Expand Down
4 changes: 2 additions & 2 deletions apps/admin/app/(all)/(home)/sign-in-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { useEffect, useMemo, useState } from "react";
import { useSearchParams } from "@/app/hooks/navigation";
import { useSearchParams } from "@/lib/navigation";
import { HideOutline, ShowOutline } from "@makeplane/propel/icons";
// pace internal packages
import type { EAdminAuthErrorCodes, TAdminAuthErrorInfo } from "@pace/constants";
Expand All @@ -14,11 +14,11 @@ import { Button } from "@makeplane/propel/components/button";
import { Input, InputGroup } from "@makeplane/propel/components/input";
import { AuthService } from "@pace/services";
// components
import { AuthHeader } from "@/components/common/auth-header";
import { Banner } from "@/components/common/banner";
// local components
import { FormHeader } from "@/components/instance/form-header";
import { AuthBanner } from "./auth-banner";
import { AuthHeader } from "./auth-header";
import { authErrorHandler } from "./auth-helpers";
import { useTranslation } from "@pace/i18n";

Expand Down
2 changes: 1 addition & 1 deletion apps/admin/app/components/404.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Link } from "react-router";
// ui
import { Button } from "@makeplane/propel/components/button";
// images
import Image404 from "@/app/assets/images/404.svg?url";
import Image404 from "@/assets/images/404.svg?url";
import { useTranslation } from "@pace/i18n";

function PageNotFound() {
Expand Down
8 changes: 4 additions & 4 deletions apps/admin/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import type { ReactNode } from "react";
import { Links, Meta, Outlet, Scripts } from "react-router";
import type { LinksFunction } from "react-router";
import appleTouchIcon from "@/app/assets/favicon/apple-touch-icon.png?url";
import favicon16 from "@/app/assets/favicon/favicon-16x16.png?url";
import favicon32 from "@/app/assets/favicon/favicon-32x32.png?url";
import faviconIco from "@/app/assets/favicon/favicon.ico?url";
import appleTouchIcon from "@/assets/favicon/apple-touch-icon.png?url";
import favicon16 from "@/assets/favicon/favicon-16x16.png?url";
import favicon32 from "@/assets/favicon/favicon-32x32.png?url";
import faviconIco from "@/assets/favicon/favicon.ico?url";
import { LogoSpinner } from "@/components/common/logo-spinner";
// helpers
import { getAdminPageDescription, getAdminPageTitle } from "@/helpers/page-title";
Expand Down
2 changes: 1 addition & 1 deletion apps/admin/core/components/authentication/gitea-config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { observer } from "mobx-react";
import Link from "@/app/hooks/link";
import Link from "@/lib/navigation/link";
// icons
import { SettingsOutline } from "@makeplane/propel/icons";
// pace internal packages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { observer } from "mobx-react";
import Link from "@/app/hooks/link";
import Link from "@/lib/navigation/link";
// icons
import { SettingsOutline } from "@makeplane/propel/icons";
// pace internal packages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { observer } from "mobx-react";
import Link from "@/app/hooks/link";
import Link from "@/lib/navigation/link";
// icons
import { SettingsOutline } from "@makeplane/propel/icons";
// pace internal packages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { observer } from "mobx-react";
import Link from "@/app/hooks/link";
import Link from "@/lib/navigation/link";
// icons
import { SettingsOutline } from "@makeplane/propel/icons";
// pace internal packages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* See the LICENSE file for details.
*/

import Link from "@/app/hooks/link";
import Link from "@/lib/navigation/link";
import { PaceLockup } from "@/components/common/pace-lockup";

export function AuthHeader() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import React from "react";
import Link from "@/app/hooks/link";
import Link from "@/lib/navigation/link";
// headless ui
import { Dialog, Transition } from "@headlessui/react";
// ui
Expand Down
4 changes: 2 additions & 2 deletions apps/admin/core/components/common/header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import { Fragment } from "react";
import { observer } from "mobx-react";
import Link from "@/app/hooks/link";
import { usePathname } from "@/app/hooks/navigation";
import Link from "@/lib/navigation/link";
import { usePathname } from "@/lib/navigation";
// icons
import { Menu } from "lucide-react";
import { SettingsOutline } from "@makeplane/propel/icons";
Expand Down
4 changes: 2 additions & 2 deletions apps/admin/core/components/common/logo-spinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/

import { useTheme } from "next-themes";
import LogoSpinnerDark from "@/app/assets/images/logo-spinner-dark.gif?url";
import LogoSpinnerLight from "@/app/assets/images/logo-spinner-light.gif?url";
import LogoSpinnerDark from "@/assets/images/logo-spinner-dark.gif?url";
import LogoSpinnerLight from "@/assets/images/logo-spinner-light.gif?url";

export function LogoSpinner() {
const { resolvedTheme } = useTheme();
Expand Down
6 changes: 3 additions & 3 deletions apps/admin/core/components/common/new-user-popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
*/

import { observer } from "mobx-react";
import Link from "@/app/hooks/link";
import Link from "@/lib/navigation/link";
import { useTheme as useNextTheme } from "next-themes";
// ui
import { Button } from "@makeplane/propel/components/button";
import { resolveGeneralTheme } from "@pace/utils";
// hooks
import TakeoffIconDark from "@/app/assets/logos/takeoff-icon-dark.svg?url";
import TakeoffIconLight from "@/app/assets/logos/takeoff-icon-light.svg?url";
import TakeoffIconDark from "@/assets/logos/takeoff-icon-dark.svg?url";
import TakeoffIconLight from "@/assets/logos/takeoff-icon-light.svg?url";
import { useTheme } from "@/hooks/store";
import { useTranslation } from "@pace/i18n";
// icons
Expand Down
6 changes: 3 additions & 3 deletions apps/admin/core/components/instance/failure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import { observer } from "mobx-react";
import { useTheme } from "next-themes";
import { Button } from "@makeplane/propel/components/button";
// assets
import { AuthHeader } from "@/app/(all)/(home)/auth-header";
import InstanceFailureDarkImage from "@/app/assets/instance/instance-failure-dark.svg?url";
import InstanceFailureImage from "@/app/assets/instance/instance-failure.svg?url";
import { AuthHeader } from "@/components/common/auth-header";
import InstanceFailureDarkImage from "@/assets/instance/instance-failure-dark.svg?url";
import InstanceFailureImage from "@/assets/instance/instance-failure.svg?url";
import { useTranslation } from "@pace/i18n";

const handleRetry = () => {
Expand Down
4 changes: 2 additions & 2 deletions apps/admin/core/components/instance/setup-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { useEffect, useMemo, useState } from "react";
import { useSearchParams } from "@/app/hooks/navigation";
import { useSearchParams } from "@/lib/navigation";
// icons
import { HideOutline, ShowOutline } from "@makeplane/propel/icons";
// pace internal packages
Expand All @@ -16,7 +16,7 @@ import { Input, InputGroup } from "@makeplane/propel/components/input";
import { AuthService } from "@pace/services";
import { getPasswordStrength, validatePersonName, validateCompanyName } from "@pace/utils";
// components
import { AuthHeader } from "@/app/(all)/(home)/auth-header";
import { AuthHeader } from "@/components/common/auth-header";
import { PasswordStrengthIndicator } from "@/components/common/password-strength-indicator";
import { Banner } from "../common/banner";
import { FormHeader } from "./form-header";
Expand Down
Loading
Loading