pankod/refine

View on GitHub

Showing 959 of 983 total issues

Avoid too many return statements within this function.
Open

      return ["usePermissions"];
Severity: Major
Found in packages/core/src/definitions/helpers/keys/index.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

        return (
          <Redirect
            config={{
              to: appliedRedirect,
              query: appendCurrentPathToQuery
    Severity: Major
    Found in packages/core/src/components/authenticated/index.tsx - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return <RedirectLegacy to={`${appliedRedirect}${toQuery}`} />;
      Severity: Major
      Found in packages/core/src/components/authenticated/index.tsx - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

              return ["getUserIdentity"];
        Severity: Major
        Found in packages/core/src/definitions/helpers/keys/index.ts - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

            return segments;
          Severity: Major
          Found in packages/core/src/definitions/helpers/keys/index.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

              return null;
            Severity: Major
            Found in packages/core/src/components/authenticated/index.tsx - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                    return ["useLogout"];
              Severity: Major
              Found in packages/core/src/definitions/helpers/keys/index.ts - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                      return ["useForgotPassword"];
                Severity: Major
                Found in packages/core/src/definitions/helpers/keys/index.ts - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                    return catchAll ? (
                      <>{catchAll}</>
                    ) : (
                      <LayoutWrapper>
                        <ErrorComponent />
                  Severity: Major
                  Found in packages/remix/src/legacy/routeComponent.tsx - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                          return ["useUpdatePassword"];
                    Severity: Major
                    Found in packages/core/src/definitions/helpers/keys/index.ts - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                            return ["useAuthenticated", segments[2]]; // [auth, check, params]
                      Severity: Major
                      Found in packages/core/src/definitions/helpers/keys/index.ts - About 30 mins to fix

                        Identical blocks of code found in 2 locations. Consider refactoring.
                        Open

                        export type ImportButtonProps = RefineImportButtonProps<
                          ButtonProps,
                          {
                            inputProps: UseImportInputPropsType;
                            svgIconProps?: Omit<IconProps, "ref">;
                        Severity: Minor
                        Found in packages/chakra-ui/src/components/buttons/types.ts and 1 other location - About 30 mins to fix
                        packages/mantine/src/components/buttons/types.ts on lines 45..51

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 45.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Identical blocks of code found in 2 locations. Consider refactoring.
                        Open

                        export const CreateButton: React.FC<CreateButtonProps> = ({
                          resource: resourceNameFromProps,
                          resourceNameOrRouteName: propResourceNameOrRouteName,
                          hideText = false,
                          accessControl,
                        Severity: Minor
                        Found in packages/antd/src/components/buttons/create/index.tsx and 1 other location - About 30 mins to fix
                        packages/antd/src/components/buttons/list/index.tsx on lines 19..64

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 45.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Identical blocks of code found in 2 locations. Consider refactoring.
                        Open

                              onClick={(e: React.PointerEvent<HTMLButtonElement>) => {
                                onClick ? onClick(e) : onRefresh();
                              }}
                        Severity: Minor
                        Found in packages/chakra-ui/src/components/buttons/refresh/index.tsx and 1 other location - About 30 mins to fix
                        packages/chakra-ui/src/components/buttons/refresh/index.tsx on lines 60..62

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 45.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Identical blocks of code found in 4 locations. Consider refactoring.
                        Open

                          const borderColor =
                            theme.colorScheme === "dark" ? theme.colors.dark[6] : theme.colors.gray[2];
                        Severity: Major
                        Found in packages/mantine/src/components/themedLayout/header/index.tsx and 3 other locations - About 30 mins to fix
                        packages/mantine/src/components/themedLayout/sider/index.tsx on lines 83..84
                        packages/mantine/src/components/themedLayoutV2/header/index.tsx on lines 30..31
                        packages/mantine/src/components/themedLayoutV2/sider/index.tsx on lines 74..75

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 45.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Identical blocks of code found in 3 locations. Consider refactoring.
                        Open

                          const renderLink = (link: string, text?: string) => {
                            return <ActiveLink to={link}>{text}</ActiveLink>;
                          };
                        packages/core/src/components/pages/auth/components/forgotPassword/index.tsx on lines 40..42
                        packages/core/src/components/pages/auth/components/register/index.tsx on lines 48..50

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 45.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Identical blocks of code found in 2 locations. Consider refactoring.
                        Open

                        export type ImportButtonProps = RefineImportButtonProps<
                          ButtonProps,
                          {
                            inputProps: UseImportInputPropsType;
                            svgIconProps?: Omit<IconProps, "ref">;
                        Severity: Minor
                        Found in packages/mantine/src/components/buttons/types.ts and 1 other location - About 30 mins to fix
                        packages/chakra-ui/src/components/buttons/types.ts on lines 51..57

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 45.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Identical blocks of code found in 2 locations. Consider refactoring.
                        Open

                        export const ListButton: React.FC<ListButtonProps> = ({
                          resource: resourceNameFromProps,
                          resourceNameOrRouteName: propResourceNameOrRouteName,
                          hideText = false,
                          accessControl,
                        Severity: Minor
                        Found in packages/antd/src/components/buttons/list/index.tsx and 1 other location - About 30 mins to fix
                        packages/antd/src/components/buttons/create/index.tsx on lines 19..67

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 45.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Identical blocks of code found in 4 locations. Consider refactoring.
                        Open

                          const borderColor =
                            theme.colorScheme === "dark" ? theme.colors.dark[6] : theme.colors.gray[2];
                        Severity: Major
                        Found in packages/mantine/src/components/themedLayoutV2/sider/index.tsx and 3 other locations - About 30 mins to fix
                        packages/mantine/src/components/themedLayout/sider/index.tsx on lines 83..84
                        packages/mantine/src/components/themedLayout/header/index.tsx on lines 24..25
                        packages/mantine/src/components/themedLayoutV2/header/index.tsx on lines 30..31

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 45.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Identical blocks of code found in 3 locations. Consider refactoring.
                        Open

                          const renderLink = (link: string, text?: string) => {
                            return <ActiveLink to={link}>{text}</ActiveLink>;
                          };
                        packages/core/src/components/pages/auth/components/forgotPassword/index.tsx on lines 40..42
                        packages/core/src/components/pages/auth/components/login/index.tsx on lines 41..43

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 45.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Severity
                        Category
                        Status
                        Source
                        Language