enable and auto-fix prefer-template rule

This commit is contained in:
Thomas Grainger 2017-05-08 21:15:25 +01:00
parent c43b67ea90
commit 0dafc6553c
No known key found for this signature in database
GPG key ID: 995EA0A029283160
42 changed files with 496 additions and 493 deletions

View file

@ -88,11 +88,11 @@ OutputWaiter.prototype.setOutputInfo = function(length, lines, duration) {
const lengthStr = Utils.pad(length.toString(), width, " ").replace(/ /g, " ");
const linesStr = Utils.pad(lines.toString(), width, " ").replace(/ /g, " ");
const timeStr = Utils.pad(duration.toString() + "ms", width, " ").replace(/ /g, " ");
const timeStr = Utils.pad(`${duration.toString()}ms`, width, " ").replace(/ /g, " ");
document.getElementById("output-info").innerHTML = "time: " + timeStr +
"<br>length: " + lengthStr +
"<br>lines: " + linesStr;
document.getElementById("output-info").innerHTML = `time: ${timeStr
}<br>length: ${lengthStr
}<br>lines: ${linesStr}`;
document.getElementById("input-selection-info").innerHTML = "";
document.getElementById("output-selection-info").innerHTML = "";
};
@ -134,7 +134,7 @@ OutputWaiter.prototype.saveClick = function() {
if (filename) {
const el = document.createElement("a");
el.setAttribute("href", "data:application/octet-stream;base64;charset=utf-8," + data);
el.setAttribute("href", `data:application/octet-stream;base64;charset=utf-8,${data}`);
el.setAttribute("download", filename);
// Firefox requires that the element be added to the DOM before it can be clicked