Enable object-shorthand rule (#1500)

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
This commit is contained in:
Panu Horsmalahti authored and GitHub committed 2020-11-24 13:16:35 +02:00
1 parent 2a8cfe5e67
commit ff93760dc4
42 files changed
+69 -66

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
export function downloadFile(filename: string, contents: any, type: string) {
const data = new Blob([contents], { type: type });
const data = new Blob([contents], { type });
const url = URL.createObjectURL(data);
const link = document.createElement("a");
link.href = url;
+3 -3
View File
@@ -7,19 +7,19 @@ export function interval(timeSec = 1, callback: IntervalCallback, autoRun = fals
let timer = -1;
let isRunning = false;
const intervalManager = {
start: function (runImmediately = false) {
start (runImmediately = false) {
if (isRunning) return;
const tick = () => callback(++count);
isRunning = true;
timer = window.setInterval(tick, 1000 * timeSec);
if (runImmediately) tick();
},
stop: function () {
stop () {
count = 0;
isRunning = false;
clearInterval(timer);
},
restart: function (runImmediately = false) {
restart (runImmediately = false) {
this.stop();
this.start(runImmediately);
},