Showing 646 of 1,897 total issues
API
has 55 functions (exceeds 20 allowed). Consider refactoring. Open
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 {
File maybe_highlight.tsx
has 481 lines of code (exceeds 250 allowed). Consider refactoring. Open
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";
File component.tsx
has 473 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from "react";
import {
BlurableInput,
EmptyStateWrapper,
EmptyStateGraphic,
File location_info.tsx
has 470 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from "react";
import { Everything, MovementState, TimeSettings } from "../interfaces";
import { BotPosition, UserEnv } from "../devices/interfaces";
import { connect } from "react-redux";
import { getUrlQuery } from "../util";
File data.tsx
has 465 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from "react";
import { t } from "../../i18next_wrapper";
import { FirmwareHardware } from "farmbot";
import { Actions, TourContent } from "../../constants";
import { Tour, TourStep } from "./interfaces";
Function render
has 173 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { H_LO, H_HI, S_LO, S_HI, V_LO, V_HI } = this.props;
const cameraCalibrationEnv = this.props.namespace("H_LO").includes("CAMERA");
const defaultHLow = this.getDefault(cameraCalibrationEnv ? "H_HI" : "H_LO");
const defaultHHigh = this.getDefault(cameraCalibrationEnv ? "H_LO" : "H_HI");
File select_plants.tsx
has 447 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from "react";
import { useNavigate } from "react-router-dom";
import { connect } from "react-redux";
import { Everything, TimeSettings } from "../interfaces";
import { PlantInventoryItem } from "./plant_inventory_item";
Function Bed
has 167 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const Bed = (props: BedProps) => {
const {
bedWidthOuter, bedLengthOuter, botSizeZ, bedHeight, bedZOffset,
legSize, legsFlush, extraLegsX, extraLegsY, bedBrightness, soilBrightness,
soilHeight, ccSupportSize, axes, xyDimensions,
File actions.ts
has 441 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import axios from "axios";
import { success, warning, info, error } from "../toast/toast";
import { getDevice } from "../device";
import { Everything } from "../interfaces";
import {
File crop_info.tsx
has 440 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from "react";
import { svgToUrl } from "../open_farm/icons";
import {
CropInfoProps, CropLiveSearchResult, DesignerState, OpenfarmSearch,
} from "../farm_designer/interfaces";
File constants.ts
has 435 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable max-len */
import { sampleSize } from "lodash";
export const LIB_DIR = "/3D/lib/";
File cards.tsx
has 429 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from "react";
import { t } from "../i18next_wrapper";
import {
AlertCardProps, AlertCardTemplateProps, FirmwareMissingProps,
SeedDataMissingProps, SeedDataMissingState, TourNotTakenProps,
File config.ts
has 428 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
export interface Config {
sizePreset: string;
bedType: string;
otherPreset: string;
label: string;
File chart.tsx
has 422 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from "react";
import { t } from "../i18next_wrapper";
import { floor, isUndefined, range, round } from "lodash";
import { Curve } from "farmbot/dist/resources/api_resources";
import { Color, Popover } from "../ui";
File zoom_beacons_constants.tsx
has 419 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from "react";
import { findIndex } from "lodash";
import { Config } from "./config";
import { threeSpace, zDir, zZero } from "./helpers";
import { ExternalUrl } from "../external_urls";
Function UtilitiesPost
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const UtilitiesPost = (props: UtilitiesPostProps) => {
const {
utilitiesPost, legSize, bedLengthOuter, bedWidthOuter,
bedBrightness, bedHeight, bedZOffset,
} = props.config;
Function render
has 146 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { dispatch, sequence } = this.props;
const { viewSequenceCeleryScript, view } = this.state;
const variableData = this.props.resources.sequenceMetas[sequence.uuid] || {};
const declarations = betterCompact(Object.values(variableData)
File map_image.tsx
has 407 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from "react";
import { TaggedImage } from "farmbot";
import { CameraCalibrationData, BotOriginQuadrant } from "../../../interfaces";
import { MapTransformProps } from "../../interfaces";
import { transformXY } from "../../util";
File content.tsx
has 407 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from "react";
import { t } from "../i18next_wrapper";
import { Content, SetupWizardContent } from "../constants";
import { FilePath } from "../internal_urls";
import { isMobile } from "../screen_size";
Function AxisSettings
has 144 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function AxisSettings(props: AxisSettingsProps) {
const {
dispatch, bot, sourceFwConfig, firmwareConfig, botOnline,
firmwareHardware, showAdvanced,