fix lint warnings

pull/1527/head^2
Gordon Williams 2022-03-01 08:12:53 +00:00
parent 27f5579070
commit bc8eecf998
6 changed files with 11 additions and 6 deletions

View File

@ -2,4 +2,5 @@ apps/animclk/V29.LBM.js
apps/banglerun/rollup.config.js
apps/schoolCalendar/fullcalendar/main.js
apps/authentiwatch/qr_packed.js
apps/qrcode/qr-scanner.umd.min.js
*.test.js

View File

@ -353,13 +353,15 @@ const events = {
let c, p, i, l = from - o, h = to - o;
for (i = 0; (c = this.wall[i]).time < l; i++) ;
for (; (c = this.wall[i]).time < h; i++) {
if ((p = c.time < t) ? c.past : c.future)
p = c.time < t;
if (p ? c.past : c.future)
result = Math.min(result, f(c, new Date(c.time + o), p));
}
l += o; h += o; t += o;
for (i = 0; (c = this.fixed[i]).time < l; i++) ;
for (; (c = this.fixed[i]).time < h; i++) {
if ((p = c.time < t) ? c.past : c.future)
p = c.time < t;
if (p ? c.past : c.future)
result = Math.min(f(c, new Date(c.time), p));
}
return result;

View File

@ -60,7 +60,8 @@ const prepFont = (name, data) => {
let width = m[2] == '*' ? null : +m[2];
let c = null, o = 0;
lines.forEach((line, l) => {
if (m = /^(<*)(=)([*\d]*)(=*)(>*)$/.exec(line) || /^(<*)(-)(.)(-*)(>*)$/.exec(line)) {
m = /^(<*)(=)([*\d]*)(=*)(>*)$/.exec(line) || /^(<*)(-)(.)(-*)(>*)$/.exec(line);
if (m) {
const h = m[2] == '=';
if (m[1].length > desc || h && m[1].length != desc)
throw new Error('Invalid descender height at ' + l);

View File

@ -60,7 +60,8 @@ const prepFont = (name, data) => {
let width = m[2] == '*' ? null : +m[2];
let c = null, o = 0;
lines.forEach((line, l) => {
if (m = /^(<*)(=)([*\d]*)(=*)(>*)$/.exec(line) || /^(<*)(-)(.)(-*)(>*)$/.exec(line)) {
m = /^(<*)(=)([*\d]*)(=*)(>*)$/.exec(line) || /^(<*)(-)(.)(-*)(>*)$/.exec(line);
if (m) {
const h = m[2] == '=';
if (m[1].length > desc || h && m[1].length != desc)
throw new Error('Invalid descender height at ' + l);

View File

@ -179,7 +179,8 @@ var buf = Graphics.createArrayBuffer(240,160,2,{msb:true});
let LED = // LED as minimal and only definition (as instance / singleton)
{ isOn: false // status on / off, not needed if you don't need to ask for it
, set: function(v) { // turn on w/ no arg or truey, else off
g.setColor((this.isOn=(v===undefined||!!v))?1:0,0,0).fillCircle(120,10,10); }
this.isOn = v===undefined||!!v;
g.setColor(this.isOn?1:0,0,0).fillCircle(120,10,10); }
, reset: function() { this.set(false); } // turn off
, write: function(v) { this.set(v); } // turn on w/ no arg or truey, else off
, toggle: function() { this.set( ! this.isOn); } // toggle the LED

View File

@ -71,7 +71,6 @@ function chooseIconByCode(code) {
case 801: return partSunIcon;
default: return cloudIcon;
}
break;
default: return cloudIcon;
}
}