1
0
Fork 0

Warn about empty blocks

master
Anton 2024-02-26 15:03:50 +01:00
parent c06296b1cd
commit 241b6e20ce
10 changed files with 14 additions and 26 deletions

View File

@ -144,7 +144,7 @@
],
"no-constant-condition": "off",
"no-delete-var": "off",
"no-empty": "off",
"no-empty": ["warn", { "allowEmptyCatch": true }],
"no-global-assign": "off",
"no-inner-declarations": "off",
"no-prototype-builtins": "off",

View File

@ -104,7 +104,6 @@ Bangle.on('lcdPower',on=>{
if (on) {
secondInterval = setInterval(draw, 1000);
draw(); // draw immediately
}else{
}
});
Bangle.on('lock',on=>{

View File

@ -270,8 +270,7 @@ function queueDraw() {
function draw() {
if (pause){}
else{
if (!pause){
// get date
var d = new Date();
var da = d.toString().split(" ");

View File

@ -66,10 +66,8 @@ function moveEnemyPosition(){
enemyPositonCenterX2 = 120;
}else if((randomRoadPositionIndicator2 == 3)){
enemyPositonCenterX2 = 155;
}else if(level == 7||level == 8){
}
}
} // TODO: else if(level == 7)
}
function collision(){

View File

@ -223,9 +223,8 @@ function fixTime() {
Bangle.on("GPS",function cb(g) {
Bangle.setGPSPower(0,"time");
Bangle.removeListener("GPS",cb);
if (!g.time || (g.time.getFullYear()<2000) ||
(g.time.getFullYear()>2200)) {
} else {
if (g.time && (g.time.getFullYear()>=2000) &&
(g.time.getFullYear()<=2200)) {
// We have a GPS time. Set time
setTime(g.time.getTime()/1000);
}

View File

@ -24,8 +24,7 @@
var s = width - 1;
var x = this.x;
var y = this.y;
if ((typeof x === 'undefined') || (typeof y === 'undefined')) {
} else {
if (x !== undefined && y !== undefined) {
g.setBgColor(COLORS.white);
g.clearRect(old_x, old_y, old_x + width, old_y + height);

View File

@ -85,7 +85,7 @@ function novaOpenEyes(speed, white, animation) {
scale: 2.2
});
}, speed * 5);
} else {}
}
} else {
g.drawImage(novaEyesStage4(), -10, -10, {
@ -126,7 +126,7 @@ function novaOpenEyes(speed, white, animation) {
});
open = true;
}, speed * 5);
} else {}
}
}
}
@ -136,7 +136,7 @@ function novaCloseEyes(speed, white, animation) {
g.drawImage(novaEyesStage0(), -10, -10, {
scale: 2.2
});
} else {}
}
setTimeout(function() {
g.drawImage(novaEyesStage1(), -10, -10, {
scale: 2.2
@ -164,7 +164,7 @@ function novaCloseEyes(speed, white, animation) {
g.drawImage(novaEyesWhiteStage0(), -10, -10, {
scale: 2.2
});
} else {}
}
setTimeout(function() {
timedraw(true);
g.drawImage(novaEyesTransStage1(), -10, -10, {

View File

@ -486,8 +486,7 @@ function canPlay(hand, palette, otherPalette) {
} else {
//Check if any palette play can win with rule.
for(let h of hand.handCards) {
if(h === c) {}
else {
if(h !== c) {
clonePalette.addCard(c);
if(isWinningCombo(c, clonePalette, otherPalette)) {
return true;
@ -531,8 +530,7 @@ class AI {
} else {
//Check if any palette play can win with rule.
for(let h of this.hand.handCards) {
if(h === c) {}
else {
if(h !== c) {
clonePalette.addCard(h);
if(isWinningCombo(c, clonePalette, otherPalette)) {
ruleStack.addCard(c);

View File

@ -8,8 +8,6 @@ const hs = require('./heatshrink.js');
if (pc) {
fs = require('fs');
var print=console.log;
} else {
}
function writeDir(json) {

View File

@ -968,8 +968,7 @@ function activateItem () {
animateToClock();
break;
case 0: // food
if (tama.sleep) {
} else {
if (!tama.sleep) {
// evolution = 0;
mode = 'food';
lightSelect = 0;
@ -979,8 +978,7 @@ function activateItem () {
mode = 'light';
break;
case 2: // game
if (tama.sleep) {
} else {
if (!tama.sleep) {
animateToGame();
}
break;