Showing 646 of 1,897 total issues
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 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 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 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 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 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 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 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 render
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const sensorNameByPinLookup: { [x: number]: string } = {};
this.props.sensors.map(x => {
sensorNameByPinLookup[x.body.pin || 0] = x.body.label;
});
Function SetupIncomplete
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SetupIncomplete = (props: SetupIncompleteProps) => {
const resources = store.getState().resources.index;
const percentComplete = setupProgressString(
selectAllWizardStepResults(resources),
{
Function Setting
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
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}>
Function TableRow
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const TableRow = (props: TableRowProps) => {
const {
sensorReading, timeSettings, period, sensorName, hover, hovered,
} = props;
const { uuid, body } = sensorReading;
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 AlertCard
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
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":
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);
Function PanelSection
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const PanelSection = (props: PanelSectionProps) => {
const { isOpen } = props;
return <div className={`panel-section ${isOpen ? "open" : ""}`}>
<div className={"section-header"}
onClick={props.toggleOpen}>
Function ToolVerification
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
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
Function getPaths
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getPaths = (props: PlotContentProps): Paths => {
const last = getLastEntry();
const keys = getKeys(props);
const maxY = findYLimit(props);
const plotY = calcY(props);
Function render
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { cropSearchResults } = this.props.designer;
const { result, backgroundURL } =
getCropHeaderProps({ cropSearchResults });
const panelName = "add-plant";