Skip to content

Commit 1e4084d

Browse files
committed
small lint tweaks
1 parent 5d41f36 commit 1e4084d

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

bin/espruino-cli.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ for (var i=2;i<process.argv.length;i++) {
195195
args.espruinoPrefix = args.quiet?"":"--] ";
196196
args.espruinoPostfix = "";
197197
if (args.color) {
198-
args.espruinoPrefix = "\033[32m";
199-
args.espruinoPostfix = "\033[0m";
198+
args.espruinoPrefix = "\x1b[32m"; // \x1b = \033 = 27 (escape)
199+
args.espruinoPostfix = "\x1b[0m";
200200
}
201201
//this is called after Espruino tools are loaded, and
202202
//sets up configuration as requested by the command-line options

core/flasherESP8266.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* @property {string} chPD A13
3434
*/
3535

36-
/**
36+
/**
3737
* @param {FlasherOptions} options
3838
* @returns {FlasherOptions}
3939
*/
@@ -47,7 +47,7 @@
4747
function flashDevice(options) {
4848
if (!options.binary) throw new Error("Needs binary");
4949
defaultOptions(options);
50-
50+
5151
var prevReader = Espruino.Core.Serial.startListening(function (buffer) {
5252
var bufView = new Uint8Array(buffer);
5353
for (var i=0;i<bufView.length;i++)
@@ -57,7 +57,7 @@
5757
var a = l.shift();
5858
console.log(">>>",a);
5959
try {
60-
if (packetHandler) packetHandler(Espruino.Core.Utils.parseJSONish(a));
60+
if (packetHandler) packetHandler(Espruino.Core.Utils.parseRJSON(a));
6161
} catch(e) { console.log("Unable to decode"); }
6262
}
6363
uartLine = l[0];
@@ -92,9 +92,9 @@
9292
}
9393

9494
/**
95-
* @param {FlasherOptions} options
96-
* @param {number} cmd
97-
* @param {ArrayBuffer} data
95+
* @param {FlasherOptions} options
96+
* @param {number} cmd
97+
* @param {ArrayBuffer} data
9898
*/
9999
function wr(options,cmd,data) {
100100
//console.log("Write",cmd,data.length,data);
@@ -241,8 +241,8 @@ function cmdFlash(options) {
241241
}
242242

243243
/**
244-
* @param {FlasherOptions} options
245-
* @param {(version: string) => void} callback
244+
* @param {FlasherOptions} options
245+
* @param {(version: string) => void} callback
246246
*/
247247
function getFirmwareVersion(options, callback) {
248248
defaultOptions(options);

0 commit comments

Comments
 (0)