Showing 646 of 1,897 total issues
Function BotPositionRows
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const BotPositionRows = (props: BotPositionRowsProps) => {
const { locationData, getConfigValue, arduinoBusy, locked } = props;
const hardwareDisabled = disabledAxisMap(props.firmwareSettings);
const commonAxisActionProps = {
botOnline: props.botOnline,
File move_to.tsx
has 270 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from "react";
import { Row, Popover } from "../ui";
import { BotPosition } from "../devices/interfaces";
import { move } from "../devices/actions";
import { useNavigate } from "react-router-dom";
Function LimitSwitches
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function LimitSwitches(props: LimitSwitchesProps) {
const { limit_switches } = props.settingsPanelState;
const { dispatch, sourceFwConfig, arduinoBusy, firmwareHardware } = props;
Function TroubleshootingTips
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const TroubleshootingTips = (props: TroubleshootingTipsProps) => {
const otherSelected = props.selectedOutcome == "other";
return <div className={"troubleshooting grid"}>
{props.step.outcomes.map(
// eslint-disable-next-line complexity
Function render
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { curves } = this.props;
const filteredCurves = curves
.filter(p => p.body.name.toLowerCase()
.includes(this.state.searchTerm.toLowerCase()));
Function Description
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Description = (props: DescriptionProps) => {
const sequenceDescription = props.sequence.body.description || "";
const [description, setDescription] = React.useState(sequenceDescription);
const [isEditing, setIsEditing] = React.useState(false);
const [isProcessing, setIsProcessing] = React.useState(false);
Function render
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { point, getX, soilHeight, getConfigValue, designer } = this.props;
const { icon, spreadDiaCm } = this.state;
const currentPlantUuid = designer.selectedPoints?.[0];
const radius = point.uuid == currentPlantUuid && designer.hoveredSpread
File plant_inventory.tsx
has 268 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from "react";
import { connect } from "react-redux";
import { PlantInventoryItem } from "./plant_inventory_item";
import { Everything, PlantsPanelState } from "../interfaces";
import { Panel } from "../farm_designer/panel_header";
File garden_map_legend.tsx
has 267 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from "react";
import { LayerToggle } from "../legend/layer_toggle";
import { GardenMapLegendProps } from "../interfaces";
import { atMaxZoom, atMinZoom } from "../zoom";
import {
Function BotTrail
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function BotTrail(props: BotTrailProps) {
const toQ = (original: Record<Xyz, number>) =>
props.getX
? { qx: props.getX(original), qy: Math.abs(original.z) }
: transformXY(original.x, original.y, props.mapTransformProps);
Function TemplatesMenu
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const TemplatesMenu = (props: ActionMenuProps) => {
const { type } = props.curve.body;
const [shapeCache, setShapeCache] = templateShape(type);
const [shape, setShapeState] = React.useState(shapeCache);
const [maxDayCache, setMaxDayCache] = templateScale(type, TemplateOption.day);
Function FolderListItem
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const FolderListItem = (props: FolderItemProps) => {
const { sequence, movedSequenceUuid, inUse } = props;
const seqName = sequence.body.name;
const url = Path.sequences(urlFriendly(seqName || ""));
const moveSource = movedSequenceUuid === sequence.uuid ? "move-source" : "";
File preview_support.tsx
has 266 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from "react";
import { t } from "../../i18next_wrapper";
import { EmptyStateWrapper, EmptyStateGraphic, Help, Markdown } from "../../ui";
import { isTaggedSequence } from "../../resources/tagged_resources";
import { Everything } from "../../interfaces";
Function render
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { toolSlot } = this;
const toolsPath = Path.tools();
const toolSlotsPath = Path.toolSlots();
const panelName = "edit-tool-slot";
Function ConnectivityDiagram
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function ConnectivityDiagram(props: ConnectivityDiagramProps) {
const { rowData, hover, hoveredConnection } = props;
const browserAPI = rowData[0];
const browserMQTT = rowData[1];
const botMQTT = rowData[2];
File weeds_inventory.tsx
has 264 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from "react";
import { connect } from "react-redux";
import { Everything, WeedsPanelState } from "../interfaces";
import { Panel } from "../farm_designer/panel_header";
import {
ComputedMove
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
Open
export class ComputedMove
extends React.Component<StepParams<Move>, ComputedMoveState> {
state: ComputedMoveState = {
locationSelection: getLocationState(this.step).locationSelection,
location: getLocationState(this.step).location,
Function render
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { wdEnvGet } = this;
const { syncStatus, botToMqttStatus } = this.props;
const botOnline = isBotOnline(syncStatus, botToMqttStatus);
const camDisabled = cameraBtnProps(this.props.env, botOnline);
Function PinGuard
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function PinGuard(props: PinGuardProps) {
const commonProps = {
dispatch: props.dispatch,
resources: props.resources,
disabled: props.arduinoBusy,
File index.tsx
has 263 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from "react";
import { FarmbotColorPicker } from "./farmbot_picker";
import { BlurableInput, Row, Help, ExpandableHeader } from "../../ui";
import { HSV } from "./interfaces";
import { WeedDetectorSlider } from "./slider";