pankod/refine

View on GitHub

Showing 756 of 987 total issues

Function numberFields has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const numberFields = (field: InferField) => {
    if (field.type === "number") {
      imports.push(["NumberField", "@refinedev/mantine"]);

      if (field.multiple) {
Severity: Minor
Found in packages/inferencer/src/inferencers/mantine/show.tsx - About 1 hr to fix

    Function emailFields has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      const emailFields = (field: InferField) => {
        if (field.type === "email") {
          imports.push(
            ["TagField", "@refinedev/chakra-ui"],
            ["EmailField", "@refinedev/chakra-ui"],
    Severity: Minor
    Found in packages/inferencer/src/inferencers/chakra-ui/show.tsx - About 1 hr to fix

      Function numberFields has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        const numberFields = (field: InferField) => {
          if (field.type === "number") {
            imports.push(
              ["NumberField", "@refinedev/chakra-ui"],
              ["TagField", "@refinedev/chakra-ui"],
      Severity: Minor
      Found in packages/inferencer/src/inferencers/chakra-ui/show.tsx - About 1 hr to fix

        Function relationHooksCode has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            .map((field) => {
              if (field?.relation && !field.fieldable && field.resource) {
                imports.push(["useSelect", "@refinedev/mantine"]);
        
                let val = accessor(recordName, field.key, field.accessor, false);
        Severity: Minor
        Found in packages/inferencer/src/inferencers/mantine/edit.tsx - About 1 hr to fix

          Function booleanFields has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            const booleanFields = (field: InferField) => {
              if (field.type === "boolean") {
                imports.push(["BooleanField", "@refinedev/mantine"]);
          
                if (field.multiple) {
          Severity: Minor
          Found in packages/inferencer/src/inferencers/mantine/show.tsx - About 1 hr to fix

            Function createUIGroup has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export const createUIGroup = (
              packages: RefinePackageInstalledVersionData[],
            ): UIGroup | null => {
              if (packages.length === 0) {
                return null;
            Severity: Minor
            Found in packages/cli/src/commands/update/interactive/index.ts - About 1 hr to fix

              Function createUrl has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                const createUrl = (
                  resource: string | IResourceItem,
                  meta: MetaDataQuery = {},
                ) => {
                  if (routerType === "legacy") {
              Severity: Minor
              Found in packages/core/src/hooks/navigation/index.ts - About 1 hr to fix

                Function transformMuiOperatorToCrudOperator has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const transformMuiOperatorToCrudOperator = (
                  operatorValue?: string,
                ): Exclude<CrudOperators, "or"> => {
                  if (!operatorValue) {
                    return "eq";
                Severity: Minor
                Found in packages/mui/src/definitions/dataGrid/index.ts - About 1 hr to fix

                  Function cancelNotification has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    const cancelNotification = () => {
                      if (notification.isRunning === true) {
                        if (notification.seconds === 0) {
                          notification.doMutation();
                        }
                  Severity: Minor
                  Found in packages/core/src/components/undoableQueue/index.tsx - About 1 hr to fix

                    Function listUrl has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      const listUrl = (
                        resource: string | IResourceItem,
                        meta: MetaDataQuery = {},
                      ) => {
                        if (routerType === "legacy") {
                    Severity: Minor
                    Found in packages/core/src/hooks/navigation/index.ts - About 1 hr to fix

                      Function metaDataToMeta has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export const metaDataToMeta = (j: JSCodeshift, source: Collection) => {
                        // find all JSX elements
                        source.find(j.JSXElement).forEach((path) => {
                          const attributes = path.node.openingElement.attributes;
                          if (!attributes) return;
                      Severity: Minor
                      Found in packages/codemod/src/transformations/v4/metadata-to-meta.ts - About 1 hr to fix

                        Function setupServer has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export const setupServer = (app: Express) => {
                          const server = app
                            .listen(SERVER_PORT, () => {
                              if (__DEVELOPMENT__) {
                                console.log(`Server started on PORT ${SERVER_PORT}`);
                        Severity: Minor
                        Found in packages/devtools-server/src/setup-server.ts - About 1 hr to fix

                          Function emailFields has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            const emailFields = (field: InferField) => {
                              if (field.type === "email") {
                                imports.push(
                                  ["TagField", "@refinedev/antd"],
                                  ["EmailField", "@refinedev/antd"],
                          Severity: Minor
                          Found in packages/inferencer/src/inferencers/antd/show.tsx - About 1 hr to fix

                            Function renderTreeView has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              const renderTreeView = (tree: ITreeMenu[], selectedKey?: string) => {
                                return tree.map((item) => {
                                  const { icon, label, route, name, children } = item;
                            
                                  const isSelected = item.key === selectedKey;
                            Severity: Minor
                            Found in packages/mantine/src/components/themedLayoutV2/sider/index.tsx - About 1 hr to fix

                              Function textFields has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                const textFields = (field: InferField) => {
                                  if (field.type === "text") {
                                    imports.push(["TextField", "@refinedev/mantine"]);
                              
                                    if (field.multiple) {
                              Severity: Minor
                              Found in packages/inferencer/src/inferencers/mantine/show.tsx - About 1 hr to fix

                                Function imageFields has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  const imageFields = (field: InferField) => {
                                    if (field.type === "image") {
                                      if (field.multiple) {
                                        const val = accessor("item", undefined, field.accessor);
                                
                                
                                Severity: Minor
                                Found in packages/inferencer/src/inferencers/mui/show.tsx - About 1 hr to fix

                                  Function textFields has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    const textFields = (field: InferField) => {
                                      if (field.type === "text") {
                                        imports.push(
                                          ["TagField", "@refinedev/chakra-ui"],
                                          ["TextField", "@refinedev/chakra-ui"],
                                  Severity: Minor
                                  Found in packages/inferencer/src/inferencers/chakra-ui/show.tsx - About 1 hr to fix

                                    Function renderProviders has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      const renderProviders = () => {
                                        if (providers && providers.length > 0) {
                                          return (
                                            <>
                                              <Stack spacing={1}>
                                    Severity: Minor
                                    Found in packages/mui/src/components/pages/auth/components/login/index.tsx - About 1 hr to fix

                                      Function resourceNametoResource has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const resourceNametoResource = (j: JSCodeshift, source: Collection) => {
                                        const willCheckHooks = ["useExport", "useImport"];
                                      
                                        willCheckHooks.forEach((hookName) => {
                                          const useListHooks = source.find(j.CallExpression, {
                                      Severity: Minor
                                      Found in packages/codemod/src/transformations/v4/fix-v4-deprecations.ts - About 1 hr to fix

                                        Function sorterToSorters has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const sorterToSorters = (j: JSCodeshift, source: Collection) => {
                                          const willCheckHooks = ["useExport"];
                                        
                                          willCheckHooks.forEach((hookName) => {
                                            const useListHooks = source.find(j.CallExpression, {
                                        Severity: Minor
                                        Found in packages/codemod/src/transformations/v4/fix-v4-deprecations.ts - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language