Showing 646 of 1,897 total issues
Function textAnchorPosition
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const textAnchorPosition = (
pulloutDirection: ToolPulloutDirection,
quadrant: BotOriginQuadrant,
xySwap: boolean,
gantryMounted: boolean,
Function SensorReadingsLayer
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function SensorReadingsLayer(props: SensorReadingsLayerProps) {
const {
visible, sensorReadings, mapTransformProps, timeSettings, sensors
} = props;
const mostRecentSensorReading = last(sensorReadings);
Function reduceMoveAbsolute
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const reduceMoveAbsolute = (
step: MoveAbsolute,
sequenceUuid: UUID | undefined,
): Position | undefined => {
const offset = step.args.offset.args;
Function Section
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Section = (sectionProps: SectionProps) => {
const { title, configKey, options } = sectionProps;
return <div className={"setting-section"}>
<div className="setting-title">{title}</div>
<div className={"row"}>
Function commitBulkEditor
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function commitBulkEditor(): Thunk {
return function (dispatch, getState) {
const resources = getState().resources;
const { weeks, dailyOffsetMs, selectedSequenceUUID, currentRegimen } =
resources.consumers.regimens;
Function Apology
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function Apology(_: {}) {
return <div style={OUTER_STYLE}>
<div style={INNER_STYLE}>
<h1 style={{ fontSize: "175%" }}>Page Error</h1>
<span>
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { dispatch, bot } = this.props;
return <div className={"logs-tab grid"}>
<div className={"search-row"}>
<SearchField nameKey={"logs"}
Function RawGroupListPanel
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const RawGroupListPanel = (props: GroupListPanelProps) => {
const [searchTerm, setSearchTerm] = React.useState("");
const navigate = useNavigate();
const navigateById = (id: number | undefined) => () => navigate(Path.groups(id));
Function beforeEach
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const beforeEach = (state: RestResources,
action: ReduxAction<unknown>,
handler: ActionHandler<RestResources, unknown>) => {
const { byKind, references } = state.index;
const w = references[Object.keys(byKind.WebAppConfig)[0]];
Consider simplifying this complex logical expression. Open
Open
if (box &&
isNumber(box.x0) && isNumber(box.y0) &&
isNumber(box.x1) && isNumber(box.y1)) {
return (
p.body.x >= Math.min(box.x0, box.x1) &&
Function PhotoResolutionSettingChanged
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(props: CaptureSizeSelectionProps) => {
const { env, dispatch, saveFarmwareEnv } = props;
const { width, height } = getCurrentSizeSetting(env);
const selectedLongEdge = Math.max(parseInt(width), parseInt(height));
const calibratedX = env["CAMERA_CALIBRATION_center_pixel_location_x"];
Function DesignerPanelHeader
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const DesignerPanelHeader = (props: DesignerPanelHeaderProps) => {
const panelColor = props.panel ? TAB_COLOR[props.panel] : props.panelColor;
const colorClass = props.colorClass || `${panelColor || PanelColor.gray}-panel`;
const navigate = useNavigate();
return <div className={`panel-header ${colorClass}`}
Function render
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return <div className={"drop-area"} {...this.mapDropAreaProps()}>
<ErrorBoundary>
<svg id={"map-background-svg"}>
<this.MapBackground />
Function LocationActions
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const LocationActions = (props: LocationActionsProps) => {
const navigate = useNavigate();
return <div className={"location-actions"}>
<MoveToForm
chosenLocation={props.chosenLocation}
Function ZDisplay
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const ZDisplay = (props: ZDisplayProps) => {
const tools = props.allPoints.filter(p => p.body.pointer_type == "ToolSlot")
.map(p => p.body.z).sort()[0];
const soil = props.allPoints.filter(soilHeightPoint)
.map(p => p.body.z).sort()[0];
Function responseRejected
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function responseRejected(x: SafeError | undefined) {
if (x && isSafeError(x)) {
dispatchNetworkUp("user.api", now());
const a = ![451, 401, 422].includes(x.response.status);
const b = x.response.status > 399;
Function BindingTargetDropdown
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const BindingTargetDropdown = (props: BindingTargetDropdownProps) => {
const list = () => {
const { resources } = props;
const dropDownList: DropDownItem[] = [];
Function render
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const farmwareNames = Object.values(this.props.farmwares)
.map(fw => fw.name)
.filter(farmwareName => farmwareName != FarmwareName.MeasureSoilHeight)
.filter(fwName => !this.props.firstPartyFarmwareNames.includes(fwName));
Function mapStateToProps
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function mapStateToProps(props: Everything): EditPlantInfoProps {
const openedSavedGarden =
props.resources.consumers.farm_designer.openedSavedGarden;
const gardenOpen = !!openedSavedGarden;
const findPlant = (id: string | undefined) => {
Function deletePoints
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function deletePoints(
pointName: string,
query: Partial<Point>,
cb?: ProgressCallback): Thunk {
// TODO: Generalize and add to api/crud.ts