1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-07-07 02:31:07 +01:00

chore: decaffeinate: fix eslint violations

This commit is contained in:
hacksalot
2018-02-14 10:02:44 -05:00
parent 8a46d642e5
commit 42d249b407
40 changed files with 412 additions and 454 deletions

View File

@ -7,8 +7,10 @@
// https://raw.githubusercontent.com/ariya/phantomjs/master/examples/rasterize.js
// Converted to CoffeeScript by hacksalot
"use strict";let output, size;
/* eslint-disable */
'use strict';
let output, size;
const page = require('webpage').create();
const system = require('system');
let address = (output = (size = null));
@ -27,14 +29,14 @@ if ((system.args.length < 3) || (system.args.length > 5)) {
output = system.args[2];
page.viewportSize = {width: 600, height: 600};
if ((system.args.length > 3) && (system.args[2].substr(-4) === ".pdf")) {
if ((system.args.length > 3) && (system.args[2].substr(-4) === '.pdf')) {
size = system.args[3].split('*');
page.paperSize =
size.length === 2 ? {width: size[0], height: size[1], margin: '0px'}
: {format: system.args[3], orientation: 'portrait', margin: '1cm'};
} else if ((system.args.length > 3) && (system.args[3].substr(-2) === "px")) {
} else if ((system.args.length > 3) && (system.args[3].substr(-2) === 'px')) {
let pageHeight, pageWidth;
size = system.args[3].split('*');
if (size.length === 2) {
@ -43,10 +45,12 @@ if ((system.args.length < 3) || (system.args.length > 5)) {
page.viewportSize = {width: pageWidth, height: pageHeight};
page.clipRect = {top: 0, left: 0, width: pageWidth, height: pageHeight};
} else {
console.log("size:", system.args[3]);
// eslint-ignore-next-line no-console
console.log('size:', system.args[3]);
pageWidth = parseInt(system.args[3], 10);
pageHeight = parseInt((pageWidth * 3)/4, 10); // it's as good an assumption as any
console.log("pageHeight:", pageHeight);
// eslint-ignore-next-line no-console
console.log('pageHeight:', pageHeight);
page.viewportSize = {width: pageWidth, height: pageHeight};
}
}
@ -69,3 +73,4 @@ if ((system.args.length < 3) || (system.args.length > 5)) {
}
});
}
/* esline-enable */