Showing 651 of 1,980 total issues
Function NumberCriteriaSelection
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const NumberCriteriaSelection = (props: NumberCriteriaProps) => {
const criteriaField = props.criteria[props.criteriaKey];
return <div className={"number-gt-lt-criteria"}>
<AddNumberCriteria {...props} />
{criteriaField && Object.entries(criteriaField)
Function render
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return <div className={`add-${this.props.type}-eq-criteria`}>
<Row>
<Col xs={4}>
<input type="string"
Function render
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return <div className="add-number-criteria">
<Row>
<Col xs={4}>
<input type="string"
Function sanitizeNodes
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const sanitizeNodes = (thisSequence: Sequence): SanitizationResult => {
// Collect all *declared* variables.
const declared: Dictionary<ScopeDeclarationBodyItem> = {};
(thisSequence.args.locals.body || []).map(variable =>
declared[variable.args.label] = variable);
Function render
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const H_AVG = this.props.invertHue
? 0
: ((this.props.h[1] * 2 + this.props.h[0] * 2) / 2);
/** 💥💥💥SURPRISING CODE AHEAD:
Function resourceList
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(resources: ResourceIndex, sequenceUuid: UUID): DropDownItem[] => {
const deviceId = maybeGetDevice(resources)?.body.id || 0;
const points = selectAllPoints(resources).filter(p => !!p.body.id);
const mapPoints = points.filter(p => p.body.pointer_type == "GenericPointer");
const weeds = points.filter(p => p.body.pointer_type == "Weed");
Function lightsFigure
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
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}`}>
Function jogPoints
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
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";
Function SeedTrough
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
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}
Function RotaryToolImplementProfile
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const RotaryToolImplementProfile = (props: SpecificToolProfileProps) => {
const { x, y, sideView } = props;
const motorR = RotaryToolDimensions.motorRadius;
const motorV = RotaryToolDimensions.motorHeight;
const spindleR = RotaryToolDimensions.spindleRadius;
Function ToolbaySlot
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
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;
Function dropPlant
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const dropPlant = (props: DropPlantProps) => {
const {
gardenCoords, gridSize, dispatch, getConfigValue,
} = props;
const { companionIndex, cropSearchResults, openedSavedGarden } = props.designer;
Function Weeder
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const Weeder = (props: ToolGraphicProps) => {
const { x, y, hovered } = props;
const width = WeederDimensions.width;
const height = WeederDimensions.thickness;
return <g id={"weeder"}>
Function FirmwareNumberSettings
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const FirmwareNumberSettings = (props: FirmwareNumberSettingsProps) => {
const sourceFwConfig = sourceFwConfigValue(
validFwConfig(getFirmwareConfig(props.resources)),
props.bot.hardware.mcu_params);
return <div className={"motor-settings"}>
Function PointGraphic
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const PointGraphic = (props: ProfilePointProps) => {
const { point } = props;
const { color } = props.point.body.meta;
switch (point.body.pointer_type) {
case "ToolSlot":
Function MarkedSlider
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
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}
Function SaveBtn
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function SaveBtn(props: SaveBtnProps) {
const CLASS: Record<SpecialStatus, string> = {
[SpecialStatus.DIRTY]: "is-dirty",
[SpecialStatus.SAVING]: "is-saving",
[SpecialStatus.SAVED]: "is-saved",
Function render
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return <Highlight settingName={DeviceSetting.importParameters}>
<Row>
<Col xs={12}>
<label>
Function CameraOffset
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const CameraOffset = (props: WizardStepComponentProps) => {
const helpText = t(ToolTips.CAMERA_OFFSET, {
defaultX: WD_KEY_DEFAULTS["CAMERA_CALIBRATION_camera_offset_x"],
defaultY: WD_KEY_DEFAULTS["CAMERA_CALIBRATION_camera_offset_y"],
});
Function mapStateToProps
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
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);