Skip to content

Commit

Permalink
Merge pull request #93 from Hunter275/biome-fixes
Browse files Browse the repository at this point in the history
Biome fixes
  • Loading branch information
Hunter275 authored Jun 26, 2024
2 parents 2b46f24 + 27faddd commit ad4b202
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 29 deletions.
6 changes: 3 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true
}
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true
}
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"linter": {
"enabled": true,
"rules": {
"all": true
"recommended": true
}
}
}
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@meshtastic/js",
"version": "2.3.5-0",
"version": "2.3.6-0",
"description": "Browser library for interfacing with meshtastic devices",
"license": "GPL-3.0-only",
"scripts": {
"build": "tsup",
"build": "tsup && pnpm biome format .",
"generate:docs": "typedoc src/index.ts"
},
"keywords": [
Expand All @@ -24,9 +24,7 @@
"types": "./dist/index.d.ts"
}
},
"files": [
"dist"
],
"files": ["dist"],
"bugs": {
"url": "https://github.com/meshtastic/js/issues"
},
Expand Down
40 changes: 20 additions & 20 deletions src/meshDevice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -533,28 +533,28 @@ export abstract class MeshDevice {
);
}

/**
/**
* Removes a node from the internal NodeDB of the radio by node number
*/
public async removeNodeByNum(nodeNum: number): Promise<number> {
this.log.debug(
Types.Emitter[Types.Emitter.RemoveNodeByNum],
`📻 Removing Node ${nodeNum} from NodeDB`,
);
const removeNodeByNum = new Protobuf.Admin.AdminMessage({
payloadVariant: {
case: "removeByNodenum",
value: nodeNum,
},
});
return await this.sendPacket(
removeNodeByNum.toBinary(),
Protobuf.Portnums.PortNum.ADMIN_APP,
"self",
);
}
public async removeNodeByNum(nodeNum: number): Promise<number> {
this.log.debug(
Types.Emitter[Types.Emitter.RemoveNodeByNum],
`📻 Removing Node ${nodeNum} from NodeDB`,
);

const removeNodeByNum = new Protobuf.Admin.AdminMessage({
payloadVariant: {
case: "removeByNodenum",
value: nodeNum,
},
});

return await this.sendPacket(
removeNodeByNum.toBinary(),
Protobuf.Portnums.PortNum.ADMIN_APP,
"self",
);
}

/** Shuts down the current node after the specified amount of time has elapsed. */
public async shutdown(time: number): Promise<number> {
Expand Down

0 comments on commit ad4b202

Please sign in to comment.