hadmean/hadmean

View on GitHub

Showing 150 of 428 total issues

Function useApi has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function useApi<T>(endPoint: string, options: IUseApiOptions<T>) {
  const isRestoring = useIsRestoring();

  const builtOptions = buildApiOptions(options);
  const router = useRouter();
Severity: Minor
Found in src/frontend/lib/data/useApi/index.ts - About 1 hr to fix

    Function validations has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          typescriptSafeObjectDotEntries(fields).map(([field, config]) => {
            const validationsToRun = config.validations || [];
    
            const firstFailedValidation = validationsToRun.find((validation) =>
              ENTITY_VALIDATION_CONFIG[validation.validationType]?.implementation(
    Severity: Minor
    Found in src/shared/validations/run.ts - About 1 hr to fix

      Function useSyncTableState has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function useSyncTableState<T>(
        table: Table<Record<string, unknown>>,
        overridePaginatedDataState: IPaginatedDataState<T> | undefined,
        syncPaginatedDataStateOut: (params: IPaginatedDataState<T>) => void
      ) {
      Severity: Minor
      Found in src/frontend/design-system/components/Table/hooks.tsx - About 1 hr to fix

        Function getDbInstance has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          async getDbInstance(): Promise<Knex> {
            if (DatabaseConfigDataPersistenceAdaptor._dbInstance) {
              return DatabaseConfigDataPersistenceAdaptor._dbInstance;
            }
        
        

          Function useStringSelections has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function useStringSelections(key: string) {
            const [values, set] = useSelectionStore((store) => [store.values, store.set]);
          
            const selections = values[key] || {};
          
          
          Severity: Minor
          Found in src/frontend/lib/selection/index.ts - About 1 hr to fix

            Function CredentialsSetup has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export const CredentialsSetup: CustomNextPage = () => {
              const setupCredentialsMutation = useSetupCredentialsMutation();
            
              const isChecking = useSetupCheck([
                {
            Severity: Minor
            Found in src/frontend/views/setup/Credentials/index.tsx - About 1 hr to fix

              Function integrationsConfigurationDetailsRequestHandler has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export const integrationsConfigurationDetailsRequestHandler = (
                group: IntegrationsConfigurationGroup
              ) => {
                return requestHandler(
                  {
              Severity: Minor
              Found in src/pages/api/integrations/_base/[key].ts - About 1 hr to fix

                Function DetailsCanvas has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export function DetailsCanvas() {
                  const router = useRouter();
                  const [closeDetailsCanvas, detailsCanvasEntity, detailsCanvasId] =
                    useDetailsOffCanvasStore((state) => [state.close, state.entity, state.id]);
                
                
                Severity: Minor
                Found in src/frontend/views/data/Table/_WholeEntityTable/DetailsCanvas.tsx - About 1 hr to fix

                  Function FormCodeEditor has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export function FormCodeEditor(formInput: IFormCodeEditor) {
                    const {
                      input: { onFocus, name, onBlur, ...inputProps },
                      meta,
                      language,
                  Severity: Minor
                  Found in src/frontend/design-system/components/Form/CodeEditor/index.tsx - About 1 hr to fix

                    Function isAuthenticatedValidationImpl has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export const isAuthenticatedValidationImpl: ValidationImplType<void> = async (
                      req,
                      protectedRoute: boolean
                    ) => {
                      try {

                      Function delete has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        async delete(
                          entity: string,
                          id: string,
                          accountProfile: IAccountProfile
                        ): Promise<void> {
                      Severity: Minor
                      Found in src/backend/data/data.service.ts - About 1 hr to fix

                        Function useEntityReferenceCount has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export const useEntityReferenceCount = (
                          entities: string[],
                          reference: { entity: string; entityId: string }
                        ) => {
                          const multipleEntityReferenceFields =
                        Severity: Minor
                        Found in src/frontend/hooks/data/data.store.ts - About 1 hr to fix

                          Function PersistentDocumentation has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export function PersistentDocumentation() {
                            return (
                              <DocumentationRoot>
                                <p>
                                  Persistent query is used to define a set of queries that are persisted
                          Severity: Minor
                          Found in src/frontend/docs/persistent-query.tsx - About 1 hr to fix

                            Function EntityFormActionsSettings has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export function EntityFormActionsSettings() {
                              const entity = useEntitySlug();
                              const domainMessages = useDomainMessages(
                                LANG_DOMAINS.INTEGRATIONS.FORM_ACTIONS
                              );
                            Severity: Minor
                            Found in src/frontend/views/entity/Actions/index.tsx - About 1 hr to fix

                              Function getRelationshipSettings has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                async getRelationshipSettings(entity: string): Promise<{
                                  format: string;
                                  fields: string[];
                                }> {
                                  const relationshipSettings = await this._configurationApiService.show(
                              Severity: Minor
                              Found in src/backend/data/data.service.ts - About 1 hr to fix

                                Function useRevealedCredentialsList has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export const useRevealedCredentialsList = (
                                  group: IntegrationsConfigurationGroup
                                ) => {
                                  const rootPassword = usePasswordStore((state) => state.password);
                                  const queryClient = useQueryClient();
                                Severity: Minor
                                Found in src/frontend/views/settings/Variables/configurations.store.ts - About 1 hr to fix

                                  Function buildFilterConfigFromType has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const buildFilterConfigFromType = (prop: {
                                    entityType: FormFieldTypes;
                                    entityFieldSelections: IColorableSelection[];
                                    isIdField: boolean;
                                    referenceField?: string;
                                  Severity: Minor
                                  Found in src/frontend/views/data/Table/useTableColumns.tsx - About 1 hr to fix

                                    Function doesPermissionAllowPermission has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export const doesPermissionAllowPermission = (
                                      permissions: string[],
                                      requiredPermission: string,
                                      checkGranular: boolean
                                    ): boolean => {
                                    Severity: Minor
                                    Found in src/shared/logic/permissions/index.ts - About 1 hr to fix

                                      Function getEntityRelationsForUserRole has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        async getEntityRelationsForUserRole(
                                          entity: string,
                                          userRole: string
                                        ): Promise<IEntityRelation[]> {
                                          const [validRelations, entityLabels, entityOrders] = await Promise.all([
                                      Severity: Minor
                                      Found in src/backend/entities/entities.service.ts - About 1 hr to fix

                                        Function do has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          do: async (config: IActionConfig, messageConfig: IConfig) => {
                                            return await makeIntegrationRequest("POST", {
                                              url: `https://api.sendgrid.com/v3/mail/send`,
                                              body: JSON.stringify({
                                                personalizations: [
                                        Severity: Minor
                                        Found in src/backend/integrations/libs/sendgrid/sendMail.ts - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language