belgattitude/nextjs-monorepo-example

View on GitHub

Showing 7 of 9 total issues

Function AdminSidebar has 397 lines of code (exceeds 300 allowed). Consider refactoring.
Open

export const AdminSidebar: FC = () => {
// const { data: session, status } = useSession();
const { data: session } = useSession();
const user = session?.user;
return (
Severity: Major
Found in apps/nextjs-app/src/layouts/admin/AdminSidebar.tsx - About 4 hrs to fix

    File AdminSidebar.tsx has 402 lines of code (exceeds 300 allowed). Consider refactoring.
    Open

    import { useSession } from 'next-auth/react';
    import type { FC } from 'react';
    import { TextAvatar } from '@/components/avatar/TextAvatar';
     
    export const AdminSidebar: FC = () => {
    Severity: Minor
    Found in apps/nextjs-app/src/layouts/admin/AdminSidebar.tsx - About 4 hrs to fix

      File PoemSeeds.ts has 312 lines of code (exceeds 300 allowed). Consider refactoring.
      Open

      import keywordExtractor from 'keyword-extractor';
      import { slugify } from 'transliteration';
      import type { PrismaDbMain as Prisma } from '..';
      import { AbstractSeed } from '../lib/AbstractSeed';
       
       
      Severity: Minor
      Found in packages/db-main-prisma/src/seeds/PoemSeeds.ts - About 2 hrs to fix

        Function usePromise has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

        export function usePromise<
        TResult,
        TVariables extends Record<string, unknown> = Partial<Record<string, unknown>>,
        >(
        promise: AsyncFn<TResult, TVariables>,
        Severity: Minor
        Found in packages/core-lib/src/hooks/use-promise.ts - About 1 hr to fix

        Function assertIncludes has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        export function assertIncludes<T extends string[]>(
        v: string | undefined,
        stringArray: T,
        msgOrErrorFactory?: MsgOrErrorFactory,
        insensitive = false
        Severity: Minor
        Found in packages/ts-utils/src/asserts/asserts.ts - About 35 mins to fix

        Function getDevSafeInstance has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

        static getDevSafeInstance(
        instanceKey: string,
        prismaClientFactory: () => PrismaClient
        ): PrismaClient {
        if (process.env.NODE_ENV === 'production') {
        Severity: Minor
        Found in packages/db-main-prisma/src/prisma-manager.ts - About 25 mins to fix

        Function stringToFloat has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

        export function stringToFloat(value: unknown): number | null {
        if (
        !isParsableNumeric(
        typeof value === 'number' ? value.toString(10) : (value ?? '')
        )
        Severity: Minor
        Found in packages/ts-utils/src/convert/string-convert.ts - About 25 mins to fix
        Severity
        Category
        Status
        Source
        Language