pankod/refine

View on GitHub

Showing 580 of 800 total issues

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 emailFields has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      const emailFields = (field: InferField) => {
        if (field.type === "email") {
          imports.push(["EmailField", "@refinedev/mantine"]);
    
          if (field.multiple) {
    Severity: Minor
    Found in packages/inferencer/src/inferencers/mantine/show.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(
              ["TagField", "@refinedev/chakra-ui"],
              ["BooleanField", "@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(["useMany", "@refinedev/core"]);
        
                let idsString = "";
        Severity: Minor
        Found in packages/inferencer/src/inferencers/mui/list.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/mantine"]);
          
                if (field.multiple) {
          Severity: Minor
          Found in packages/inferencer/src/inferencers/mantine/show.tsx - About 1 hr to fix

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

              const urlFields = (field: InferField) => {
                if (field.type === "url") {
                  imports.push(
                    ["TagField", "@refinedev/chakra-ui"],
                    ["UrlField", "@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 numberFields has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  const numberFields = (field: InferField) => {
                    if (field.type === "number") {
                      imports.push(["NumberInput", "@mantine/core"]);
                
                      initialValues = {
                Severity: Minor
                Found in packages/inferencer/src/inferencers/mantine/edit.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 inferMultipleRecords has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        const inferMultipleRecords = (records: Record<string, unknown>[]) => {
                          // infer each record
                          // get the most common one for each field
                          // also get the first occurence of the each most common field/key and construct a fresh record from them.
                          // return the fresh record and the inferred fields
                    Severity: Minor
                    Found in packages/inferencer/src/create-inferencer/index.tsx - About 1 hr to fix

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

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

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

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

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

                          export const printUpdateWarningTable = async (
                            params: UpdateWarningTableParams,
                          ) => {
                            const data = params?.data;
                            const tableHead = Object.keys(data?.[0] || {});
                          Severity: Minor
                          Found in packages/cli/src/components/update-warning-table/table.ts - 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 transformMuiOperatorToCrudOperator has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export const transformMuiOperatorToCrudOperator = (
                                operatorValue?: string,
                              ): Exclude<CrudOperators, "or" | "and"> => {
                                if (!operatorValue) {
                                  return "eq";
                              Severity: Minor
                              Found in packages/mui/src/definitions/dataGrid/index.ts - 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 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 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 renameUseSimpleListQueryResult has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const renameUseSimpleListQueryResult = (
                                        j: JSCodeshift,
                                        source: Collection,
                                      ) => {
                                        const renameProperties = (prop) => {

                                        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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language