pankod/refine

View on GitHub

Showing 812 of 823 total issues

Function renameUseTableQueryResult has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

    Function basicToRelation has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const basicToRelation: FieldTransformer = (
      fields,
      resources,
      resource,
      record,
    Severity: Minor
    Found in packages/inferencer/src/field-transformers/basic-to-relation.ts - About 1 hr to fix

      Function imageFields has 39 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);
              return jsx`
      Severity: Minor
      Found in packages/inferencer/src/inferencers/headless/show.tsx - About 1 hr to fix

        Function addOrUpdateImports has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const addOrUpdateImports = (
          j: JSCodeshift,
          source: Collection,
          importPath: string,
          importIdentifierNames: string[],
        Severity: Minor
        Found in packages/cli/src/utils/codeshift/index.ts - About 1 hr to fix

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

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

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

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

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

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

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

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

                  Function liveProvider has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  const liveProvider = (client: Ably.Realtime): LiveProvider => {
                    return {
                      subscribe: ({ channel, types, params, callback }) => {
                        const channelInstance = client.channels.get(channel);
                  
                  
                  Severity: Minor
                  Found in packages/ably/src/index.ts - About 1 hr to fix

                    Function getInstalledRefinePackagesFromNodeModules has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export const getInstalledRefinePackagesFromNodeModules = async () => {
                      const REFINE_PACKAGES = ["core"];
                    
                      try {
                        const packagesFromGlobbySearch = await globby("node_modules/@refinedev/*", {
                    Severity: Minor
                    Found in packages/cli/src/utils/package/index.ts - 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 urlFields has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          const urlFields = (field: InferField) => {
                            if (field.type === "url") {
                              imports.push(["UrlField", "@refinedev/mantine"]);
                        
                              if (field.multiple) {
                        Severity: Minor
                        Found in packages/inferencer/src/inferencers/mantine/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/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(["BooleanField", "@refinedev/mantine"]);
                            
                                  if (field.multiple) {
                            Severity: Minor
                            Found in packages/inferencer/src/inferencers/mantine/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/antd/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(["NumberInput", "@mantine/core"]);
                                
                                      initialValues = {
                                Severity: Minor
                                Found in packages/inferencer/src/inferencers/mantine/edit.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 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 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 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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language