Remove "no-mixed-spaces-and-tabs": "off" and make linter happy

pull/450/head
Tuukka Ikkala 2020-05-23 23:51:24 +03:00
parent 894e13bd11
commit 0a32e40b1a
7 changed files with 7 additions and 8 deletions

View File

@ -34,7 +34,6 @@
"no-delete-var": "off", "no-delete-var": "off",
"no-empty": "off", "no-empty": "off",
"no-inner-declarations": "off", "no-inner-declarations": "off",
"no-mixed-spaces-and-tabs": "off",
"no-octal": "off", "no-octal": "off",
"no-prototype-builtins": "off", "no-prototype-builtins": "off",
"no-redeclare": "off", "no-redeclare": "off",

View File

@ -3,7 +3,7 @@ currently-running apps */
(() => { (() => {
function draw() { function draw() {
g.reset(); // reset the graphics context to defaults (color/font/etc) g.reset(); // reset the graphics context to defaults (color/font/etc)
// add your code // add your code
g.drawString("X", this.x, this.y); g.drawString("X", this.x, this.y);
} }

View File

@ -49,7 +49,7 @@ function drawBerlinClock() {
Bangle.on('lcdPower', (on) => { Bangle.on('lcdPower', (on) => {
g.clear(); g.clear();
if (on) { if (on) {
Bangle.drawWidgets(); Bangle.drawWidgets();
// call your app function here // call your app function here
drawBerlinClock(); drawBerlinClock();
}}); }});

View File

@ -65,7 +65,7 @@ Bangle.on('touch', function(button) {
// setting bpm by tapping the screen. Uses the mean time difference between several tappings. // setting bpm by tapping the screen. Uses the mean time difference between several tappings.
if (tindex < time_diffs.length) { if (tindex < time_diffs.length) {
if (Date.now()-tStart < 5000) { if (Date.now()-tStart < 5000) {
time_diffs[tindex] = Date.now()-tStart; time_diffs[tindex] = Date.now()-tStart;
} }
} else { } else {
tindex=0; tindex=0;

View File

@ -51,8 +51,8 @@ function drawNum(num,col,x,y,func){
let tx = x*100+25; let tx = x*100+25;
let ty = y*104+32; let ty = y*104+32;
for (let i=0;i<numerals[num].length;i++){ for (let i=0;i<numerals[num].length;i++){
if (i>0) g.setColor((func==fill)?"#000000":col); if (i>0) g.setColor((func==fill)?"#000000":col);
func(translate(tx,ty,numerals[num][i])); func(translate(tx,ty,numerals[num][i]));
} }
} }

View File

@ -5,7 +5,7 @@
function draw() { function draw() {
var width = 24; var width = 24;
g.reset(); g.reset();
g.setFont("6x8", 1); g.setFont("6x8", 1);
g.setFontAlign(0, 0); g.setFontAlign(0, 0);
g.clearRect(this.x,this.y+15,this.x+width,this.y+23); // erase background g.clearRect(this.x,this.y+15,this.x+width,this.y+23); // erase background

View File

@ -1,7 +1,7 @@
(() => { (() => {
function draw() { function draw() {
g.reset(); g.reset();
var m = process.memory(); var m = process.memory();
var pc = Math.round(m.usage*100/m.total); var pc = Math.round(m.usage*100/m.total);
g.drawImage(atob("BwgBqgP////AVQ=="), this.x+(24-7)/2, this.y+4); g.drawImage(atob("BwgBqgP////AVQ=="), this.x+(24-7)/2, this.y+4);
g.setColor(pc>70 ? "#ff0000" : (pc>50 ? "#ffff00" : "#ffffff")); g.setColor(pc>70 ? "#ff0000" : (pc>50 ? "#ffff00" : "#ffffff"));