Skip to content

chore(deps-dev): bump xo from 0.60.0 to 1.1.1 #440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions lib/body.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ class Body {
this.grippers = {};

for (const [partName, part] of Object.entries(parameter_)) {
if (Object.hasOwn(part, 'joint_names')) { // eslint-disable-line no-use-extend-native/no-use-extend-native
if (Object.hasOwn(part, 'joint_names')) {
this.jointNames[partName] = part.joint_names;
}

if (Object.hasOwn(part, 'default_configurations')) { // eslint-disable-line no-use-extend-native/no-use-extend-native
if (Object.hasOwn(part, 'default_configurations')) {
this.defaultConfigurations[partName] = part.default_configurations;
}

if (Object.hasOwn(part, 'ac_gripper')) { // eslint-disable-line no-use-extend-native/no-use-extend-native
if (Object.hasOwn(part, 'ac_gripper')) {
this.grippers[partName] = new ROSLIB.ActionClient({
ros,
serverName: part.ac_gripper,
Expand Down Expand Up @@ -93,7 +93,7 @@ class Body {
sendGripperGoal(cmd) {
console.log('Robot body: gripper goal:', cmd);

if (!Object.hasOwn(this.grippers, cmd.side)) { // eslint-disable-line no-use-extend-native/no-use-extend-native
if (!Object.hasOwn(this.grippers, cmd.side)) {
console.error(`Gripper command side must be one of [${Object.keys(this.grippers)}]. Right now, it is '${cmd.side}'`);
return;
}
Expand All @@ -118,7 +118,6 @@ class Body {
actionClient,
goalMessage: {
command: {
/* eslint camelcase:0 */
direction,
max_torque: 10,
},
Expand Down
12 changes: 6 additions & 6 deletions lib/ed.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class Ed extends EventEmitter2 {
// update object
const oldObject = this.entities.get(id);

if (Object.hasOwn(entity, 'pose')) { // eslint-disable-line no-use-extend-native/no-use-extend-native
if (Object.hasOwn(entity, 'pose')) {
const {position, quaternion} = parseEdPosition(entity.pose);
newObject.position = position;
newObject.quaternion = quaternion;
Expand All @@ -99,11 +99,11 @@ class Ed extends EventEmitter2 {
oldObject.quaternion && (newObject.quaternion = oldObject.quaternion);
}

if (Object.hasOwn(entity, 'mesh')) { // eslint-disable-line no-use-extend-native/no-use-extend-native
if (Object.hasOwn(entity, 'mesh')) {
const {vertices, faces} = parseEdMesh(entity.mesh);
newObject.vertices = vertices;
newObject.faces = faces;
} else if (Object.hasOwn(entity, 'convex_hull')) { // eslint-disable-line no-use-extend-native/no-use-extend-native
} else if (Object.hasOwn(entity, 'convex_hull')) {
const {vertices, faces} = parseEdConvexHull(entity.convex_hull);
newObject.vertices = vertices;
newObject.faces = faces;
Expand All @@ -123,17 +123,17 @@ class Ed extends EventEmitter2 {
} else {
// add object

if (Object.hasOwn(entity, 'pose')) { // eslint-disable-line no-use-extend-native/no-use-extend-native
if (Object.hasOwn(entity, 'pose')) {
const {position, quaternion} = parseEdPosition(entity.pose);
newObject.position = position;
newObject.quaternion = quaternion;
}

if (Object.hasOwn(entity, 'mesh')) { // eslint-disable-line no-use-extend-native/no-use-extend-native
if (Object.hasOwn(entity, 'mesh')) {
const {vertices, faces} = parseEdMesh(entity.mesh);
newObject.vertices = vertices;
newObject.faces = faces;
} else if (Object.hasOwn(entity, 'convex_hull')) { // eslint-disable-line no-use-extend-native/no-use-extend-native
} else if (Object.hasOwn(entity, 'convex_hull')) {
const {vertices, faces} = parseEdConvexHull(entity.convex_hull);
newObject.vertices = vertices;
newObject.faces = faces;
Expand Down
7 changes: 3 additions & 4 deletions lib/hardware-properties.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/* eslint key-spacing: 0 */
/* eslint no-multi-spaces: 0 */

/*
| Name | Homeable | HomeableMandatory | Resetable |
|---------|----------|-------------------|-----------|
Expand All @@ -11,8 +8,8 @@
*/

// transform the array of bools to an object
/* eslint-disable @stylistic/key-spacing, @stylistic/no-multi-spaces, camelcase */
const propertiesTable = {
/* eslint camelcase:0 */
// Name | Homeable | HomeableMandatory | Resetable
all: [true, false, false],
base: [false, false, true],
Expand All @@ -21,6 +18,7 @@ const propertiesTable = {
right_arm: [true, false, true],
head: [false, false, false],
};
/* eslint-enable @stylistic/key-spacing, @stylistic/no-multi-spaces */

const properties = {};
for (const name of Object.keys(propertiesTable)) {
Expand All @@ -31,5 +29,6 @@ for (const name of Object.keys(propertiesTable)) {
resetable: v[2],
};
}
/* eslint-enable camelcase */

export default properties;
12 changes: 7 additions & 5 deletions lib/hardware.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ class Hardware extends EventEmitter2 {
* > hardware.send_command('head', 'start')
*/
send_command(part, command) {
if (!Object.hasOwn(hardwareIds, part)) { // eslint-disable-line no-use-extend-native/no-use-extend-native
if (!Object.hasOwn(hardwareIds, part)) {
throw new RangeError('Invalid part');
}

if (!Object.hasOwn(commands, command)) { // eslint-disable-line no-use-extend-native/no-use-extend-native
if (!Object.hasOwn(commands, command)) {
throw new RangeError('Invalid command');
}

Expand Down Expand Up @@ -215,7 +215,7 @@ function diagnosticMessageToStatus(message) {
}

// fill all missing hardware parts with 'idle'
hardware_status = Object.assign({}, defaultStatus, hardware_status);
hardware_status = {...defaultStatus, ...hardware_status};

// add actions
for (const name of Object.keys(hardware_status)) {
Expand Down Expand Up @@ -243,15 +243,17 @@ function getActions(name, part) {
actions.home = {
enabled: level === levels.IDLE,
warning: homed
? 'This part was already homed, Are you sure you want to redo homing?' : false,
? 'This part was already homed, Are you sure you want to redo homing?'
: false,
};
}

// always show start action
actions.start = {
enabled: level === levels.IDLE && (homed || !properties_.homeable_mandatory),
warning: properties_.homeable && !homed
? 'This part is not yet homed, Are you sure you want to proceed?' : false,
? 'This part is not yet homed, Are you sure you want to proceed?'
: false,
};

// always show stop action
Expand Down
1 change: 0 additions & 1 deletion lib/head.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ class Head extends EventEmitter2 {

sendPanTiltGoal(pan, tilt) {
this.goal = new ROSLIB.Goal({
/* eslint camelcase:0 */
actionClient: this.head_ac,
goalMessage: {
// either LOOKAT or PAN_TILT
Expand Down
Loading