FarmBot/Farmbot-Web-App

View on GitHub

Showing 609 of 1,572 total issues

Function WIZARD_STEPS has 1436 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const WIZARD_STEPS = (props: WizardStepDataProps): WizardSteps => {
  const { firmwareHardware } = props;
  const xySwap = !!props.getConfigValue?.(BooleanSetting.xy_swap);
  const positiveMovementInstruction = (swap: boolean) =>
    swap
Severity: Major
Found in frontend/wizard/data.ts - About 1 wk to fix

    File constants.ts has 1916 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* eslint-disable @typescript-eslint/quotes */
    import { trim } from "./util";
    
    export namespace ToolTips {
    
    
    Severity: Major
    Found in frontend/constants.ts - About 5 days to fix

      File data.ts has 1618 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import { t } from "../i18next_wrapper";
      import { round } from "lodash";
      import { SetupWizardContent, ToolTips } from "../constants";
      import {
        WizardSection, WizardStepDataProps, WizardSteps, WizardToC, WizardToCSection,
      Severity: Major
      Found in frontend/wizard/data.ts - About 4 days to fix

        File sequence_editor_middle_active.tsx has 860 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import React from "react";
        import { t } from "../i18next_wrapper";
        import {
          ActiveMiddleProps, SequenceHeaderProps, SequenceBtnGroupProps,
          SequenceSettingProps, SequenceSettingsMenuProps, ActiveMiddleState,
        Severity: Major
        Found in frontend/sequences/sequence_editor_middle_active.tsx - About 2 days to fix

          File checks.tsx has 739 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import React from "react";
          import { TakePhotoButton } from "../controls/move/take_photo_button";
          import { mapStateToProps } from "../controls/state_to_props";
          import { store } from "../redux/store";
          import { MoveControls } from "../controls/move/move_controls";
          Severity: Major
          Found in frontend/wizard/checks.tsx - About 1 day to fix

            File garden_map.tsx has 682 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import React from "react";
            import { BooleanSetting } from "../../session_keys";
            import { closePlantInfo, unselectPlant } from "./actions";
            import {
              MapTransformProps, TaggedPlant, Mode, AxisNumberProperty,
            Severity: Major
            Found in frontend/farm_designer/map/garden_map.tsx - About 1 day to fix

              Class AbstractSeeder has 74 methods (exceeds 20 allowed). Consider refactoring.
              Open

                  class AbstractSeeder
                    include Constants
                    attr_reader :device
              
                    # DO NOT ALPHABETIZE. ORDER MATTERS! - RC
              Severity: Major
              Found in app/mutations/devices/seeders/abstract_seeder.rb - About 1 day to fix

                File celery_script_settings_bag.rb has 590 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                module CeleryScriptSettingsBag
                  class BoxLed
                    def self.name
                      "Raspberry Pi Box LED"
                    end
                Severity: Major
                Found in app/models/celery_script_settings_bag.rb - About 1 day to fix

                  File tz_list.ts has 588 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  export const list = ["Africa/Abidjan",
                    "Africa/Accra",
                    "Africa/Addis_Ababa",
                    "Africa/Algiers",
                    "Africa/Asmara",
                  Severity: Major
                  Found in frontend/devices/timezones/tz_list.ts - About 1 day to fix

                    Function Model has 252 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export const Model = (props: BoxTopBaseProps) => {
                      const box = useGLTF(MODELS.box, LIB_DIR) as Box;
                      const btn = useGLTF(MODELS.btn, LIB_DIR) as Btn;
                      const led = useGLTF(MODELS.led, LIB_DIR) as Led;
                      const SCALE = 1000;
                    Severity: Major
                    Found in frontend/settings/pin_bindings/model.tsx - About 1 day to fix

                      File route_config.tsx has 566 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      import { RouteConfig } from "takeme";
                      import { Apology } from "./apology";
                      import { Path } from "./internal_urls";
                      import { AnyConnectedComponent, ChangeRoute } from "./routes";
                      
                      
                      Severity: Major
                      Found in frontend/route_config.tsx - About 1 day to fix

                        Function Motors has 219 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export function Motors(props: MotorsProps) {
                          const {
                            dispatch, settingsPanelState, sourceFwConfig, firmwareHardware, arduinoBusy,
                            showAdvanced,
                          } = props;
                        Severity: Major
                        Found in frontend/settings/hardware_settings/motors.tsx - About 1 day to fix

                          Class None has 60 methods (exceeds 20 allowed). Consider refactoring.
                          Open

                              class None < AbstractSeeder
                                def peripherals_lighting; end
                                def peripherals_peripheral_4; end
                                def peripherals_peripheral_5; end
                                def peripherals_vacuum; end
                          Severity: Major
                          Found in app/mutations/devices/seeders/none.rb - About 1 day to fix

                            GardenMap has 58 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            export class GardenMap extends
                              React.Component<GardenMapProps, Partial<GardenMapState>> {
                              state: Partial<GardenMapState> = {};
                              constructor(props: GardenMapProps) {
                                super(props);
                            Severity: Major
                            Found in frontend/farm_designer/map/garden_map.tsx - About 1 day to fix

                              File edit_fe_form.tsx has 507 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              import React from "react";
                              import moment from "moment";
                              import { success, error, warning } from "../toast/toast";
                              import {
                                TaggedFarmEvent, SpecialStatus, TaggedSequence, TaggedRegimen,
                              Severity: Major
                              Found in frontend/farm_events/edit_fe_form.tsx - About 1 day to fix

                                API has 55 functions (exceeds 20 allowed). Consider refactoring.
                                Open

                                export class API {
                                  /** Guesses the most appropriate API port based on a number of environment
                                   *  factors such as hostname and protocol (HTTP vs. HTTPS). */
                                  static inferPort(location = window.location): string {
                                
                                
                                Severity: Major
                                Found in frontend/api/api.ts - About 7 hrs to fix

                                  File select_plants.tsx has 482 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  import React from "react";
                                  import { push } from "../history";
                                  import { connect } from "react-redux";
                                  import { Everything, TimeSettings } from "../interfaces";
                                  import { PlantInventoryItem } from "./plant_inventory_item";
                                  Severity: Minor
                                  Found in frontend/plants/select_plants.tsx - About 7 hrs to fix

                                    File maybe_highlight.tsx has 480 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    import React from "react";
                                    import { store } from "../redux/store";
                                    import { SettingsPanelState } from "../interfaces";
                                    import { toggleControlPanel, bulkToggleControlPanel } from "./toggle_section";
                                    import { getUrlQuery, urlFriendly } from "../util";
                                    Severity: Minor
                                    Found in frontend/settings/maybe_highlight.tsx - About 7 hrs to fix

                                      File component.tsx has 467 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      import React from "react";
                                      import {
                                        BlurableInput,
                                        EmptyStateWrapper,
                                        EmptyStateGraphic,
                                      Severity: Minor
                                      Found in frontend/folders/component.tsx - About 7 hrs to fix

                                        File data.tsx has 465 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        import React from "react";
                                        import { t } from "../../i18next_wrapper";
                                        import { FirmwareHardware } from "farmbot";
                                        import { Actions, TourContent } from "../../constants";
                                        import { Tour, TourStep } from "./interfaces";
                                        Severity: Minor
                                        Found in frontend/help/tours/data.tsx - About 7 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language