FarmBot/Farmbot-Web-App

View on GitHub

Showing 646 of 1,897 total issues

Function RotaryToolImplementProfile has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const RotaryToolImplementProfile = (props: SpecificToolProfileProps) => {
  const { x, y, sideView } = props;
  const motorR = RotaryToolDimensions.motorRadius;
  const motorV = RotaryToolDimensions.motorHeight;
  const spindleR = RotaryToolDimensions.spindleRadius;
Severity: Minor
Found in frontend/farm_designer/map/tool_graphics/rotary_tool.tsx - About 1 hr to fix

    Function jogPoints has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const jogPoints = (props: JogPointsProps) => {
      const { keyName, points, dispatch } = props;
      if (!(points.length > 0)) { return; }
      const { gridSize, xySwap, quadrant } = props.mapTransformProps;
      const horizontal = xySwap ? "deltaY" : "deltaX";
    Severity: Minor
    Found in frontend/farm_designer/map/layers/plants/plant_actions.ts - About 1 hr to fix

      Function PointGraphic has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const PointGraphic = (props: ProfilePointProps) => {
        const { point } = props;
        const { color } = props.point.body.meta;
        switch (point.body.pointer_type) {
          case "ToolSlot":
      Severity: Minor
      Found in frontend/farm_designer/map/profile/content.tsx - About 1 hr to fix

        Function dropPlant has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const dropPlant = (props: DropPlantProps) => {
          const {
            gardenCoords, gridSize, dispatch, getConfigValue,
          } = props;
          const { companionIndex, cropSearchResults, openedSavedGarden } = props.designer;
        Severity: Minor
        Found in frontend/farm_designer/map/layers/plants/plant_actions.ts - About 1 hr to fix

          Function SeedTrough has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const SeedTrough = (props: ToolGraphicProps) => {
            const { x, y, hovered } = props;
            return <g id={"seed-trough"}>
              <path fillOpacity={0.5}
                fill={hovered ? Color.darkGray : Color.mediumGray}
          Severity: Minor
          Found in frontend/farm_designer/map/tool_graphics/seed_trough.tsx - About 1 hr to fix

            Function Weeder has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export const Weeder = (props: ToolGraphicProps) => {
              const { x, y, hovered } = props;
              const width = WeederDimensions.width;
              const height = WeederDimensions.thickness;
              return <g id={"weeder"}>
            Severity: Minor
            Found in frontend/farm_designer/map/tool_graphics/weeder.tsx - About 1 hr to fix

              Function lightsFigure has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function lightsFigure(
                props: { i: number, x: number, y: number, height: number, xySwap: boolean }) {
                const { i, x, y, height, xySwap } = props;
                const mapHeightMid = height / 2 + y;
                return <g id="lights" key={`peripheral_${i}`}>
              Severity: Minor
              Found in frontend/farm_designer/map/layers/farmbot/bot_peripherals.tsx - About 1 hr to fix

                Function ToolbaySlot has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const ToolbaySlot = (props: ToolSlotGraphicProps) => {
                  const { id, x, y, pulloutDirection, quadrant, xySwap } = props;
                  const angle = toolbaySlotAngle(pulloutDirection, quadrant, xySwap);
                  const width = SlotDimensions.width;
                  const length = SlotDimensions.topViewLength;
                Severity: Minor
                Found in frontend/farm_designer/map/tool_graphics/slot.tsx - About 1 hr to fix

                  Function render has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    render() {
                      const sensorNameByPinLookup: { [x: number]: string } = {};
                      this.props.sensors.map(x => {
                        sensorNameByPinLookup[x.body.pin || 0] = x.body.label;
                      });
                  Severity: Minor
                  Found in frontend/sensors/sensor_readings/table.tsx - About 1 hr to fix

                    Function SetupIncomplete has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const SetupIncomplete = (props: SetupIncompleteProps) => {
                      const resources = store.getState().resources.index;
                      const percentComplete = setupProgressString(
                        selectAllWizardStepResults(resources),
                        {
                    Severity: Minor
                    Found in frontend/messages/cards.tsx - About 1 hr to fix

                      Function Setting has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export const Setting = (props: SettingProps) => {
                        const { title, setting, numberSetting, callback, defaultOn } = props;
                        const raw_value = setting ? props.getConfigValue(setting) : undefined;
                        const value = (defaultOn && isUndefined(raw_value)) ? true : !!raw_value;
                        return <Highlight settingName={title}>
                      Severity: Minor
                      Found in frontend/settings/farm_designer_settings.tsx - About 1 hr to fix

                        Function TableRow has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export const TableRow = (props: TableRowProps) => {
                          const {
                            sensorReading, timeSettings, period, sensorName, hover, hovered,
                          } = props;
                          const { uuid, body } = sensorReading;
                        Severity: Minor
                        Found in frontend/sensors/sensor_readings/table.tsx - About 1 hr to fix

                          Function MarkedSlider has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export function MarkedSlider<T = TaggedImage>(props: MarkedSliderProps<T>) {
                            return <div className={`sliders ${props.vertical ? "vertical" : ""}`}>
                              <MultiSlider
                                className={`data-slider ${props.vertical ? "vertical" : ""}`}
                                vertical={props.vertical}
                          Severity: Minor
                          Found in frontend/ui/marked_slider.tsx - About 1 hr to fix

                            Function SaveBtn has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export function SaveBtn(props: SaveBtnProps) {
                              const CLASS: Record<SpecialStatus, string> = {
                                [SpecialStatus.DIRTY]: "is-dirty",
                                [SpecialStatus.SAVING]: "is-saving",
                                [SpecialStatus.SAVED]: "is-saved",
                            Severity: Minor
                            Found in frontend/ui/save_button.tsx - About 1 hr to fix

                              Function AlertCard has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export const AlertCard = (props: AlertCardProps) => {
                                const { alert, timeSettings, findApiAlertById, dispatch } = props;
                                const commonProps = { alert, timeSettings, findApiAlertById, dispatch };
                                switch (alert.problem_tag) {
                                  case "farmbot_os.firmware.missing":
                              Severity: Minor
                              Found in frontend/messages/cards.tsx - About 1 hr to fix

                                Function mapStateToProps has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export const mapStateToProps = (props: Everything): RegimenEditorProps => {
                                  const { dispatch } = props;
                                  const { currentRegimen } = props.resources.consumers.regimens;
                                  const current = maybeGetRegimen(props.resources.index, currentRegimen);
                                  const timeSettings = maybeGetTimeSettings(props.resources.index);
                                Severity: Minor
                                Found in frontend/regimens/editor/state_to_props.ts - About 1 hr to fix

                                  Function PanelSection has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export const PanelSection = (props: PanelSectionProps) => {
                                    const { isOpen } = props;
                                    return <div className={`panel-section ${isOpen ? "open" : ""}`}>
                                      <div className={"section-header"}
                                        onClick={props.toggleOpen}>
                                  Severity: Minor
                                  Found in frontend/plants/plant_inventory.tsx - About 1 hr to fix

                                    Function ToolVerification has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export const ToolVerification = (props: ToolVerificationProps) => {
                                      const toolVerificationSensor =
                                        props.sensors.filter(sensor => sensor.body.label.toLowerCase()
                                          .includes("tool verification"))[0] as TaggedSensor | undefined;
                                      const toolVerificationPin = toolVerificationSensor
                                    Severity: Minor
                                    Found in frontend/tools/tool_verification.tsx - About 1 hr to fix

                                      Function getPaths has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const getPaths = (props: PlotContentProps): Paths => {
                                        const last = getLastEntry();
                                        const keys = getKeys(props);
                                        const maxY = findYLimit(props);
                                        const plotY = calcY(props);
                                      Severity: Minor
                                      Found in frontend/controls/move/motor_position_plot.tsx - About 1 hr to fix

                                        Function render has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          render() {
                                            const { cropSearchResults } = this.props.designer;
                                            const { result, backgroundURL } =
                                              getCropHeaderProps({ cropSearchResults });
                                            const panelName = "add-plant";
                                        Severity: Minor
                                        Found in frontend/plants/add_plant.tsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language