Pass with --fix

This commit is contained in:
Ray Schamp 2017-08-26 13:07:47 -04:00
parent a4d634d84d
commit 5113876588
14 changed files with 74 additions and 77 deletions

View file

@ -458,10 +458,7 @@ class Blocks {
`<${tagName} `<${tagName}
id="${block.id}" id="${block.id}"
type="${block.opcode}" type="${block.opcode}"
${block.topLevel ? ${block.topLevel ? `x="${block.x}" y="${block.y}"` : ''}
`x="${block.x}" y="${block.y}"` :
''
}
>`; >`;
// Add any mutation. Must come before inputs. // Add any mutation. Must come before inputs.
if (block.mutation) { if (block.mutation) {

View file

@ -3,7 +3,7 @@
* Object representing a Scratch list. * Object representing a Scratch list.
*/ */
/** /**
* @param {!string} name Name of the list. * @param {!string} name Name of the list.
* @param {Array} contents Contents of the list, as an array. * @param {Array} contents Contents of the list, as an array.
* @constructor * @constructor

View file

@ -60,7 +60,7 @@ const parseScratchObject = function (object, runtime) {
sprite.name = object.name; sprite.name = object.name;
} }
if (object.hasOwnProperty('blocks')) { if (object.hasOwnProperty('blocks')) {
for (let blockId in object.blocks) { for (const blockId in object.blocks) {
blocks.createBlock(object.blocks[blockId]); blocks.createBlock(object.blocks[blockId]);
} }
// console.log(blocks); // console.log(blocks);
@ -100,7 +100,7 @@ const parseScratchObject = function (object, runtime) {
const target = sprite.createClone(); const target = sprite.createClone();
// Load target properties from JSON. // Load target properties from JSON.
if (object.hasOwnProperty('variables')) { if (object.hasOwnProperty('variables')) {
for (let j in object.variables) { for (const j in object.variables) {
const variable = object.variables[j]; const variable = object.variables[j];
const newVariable = new Variable( const newVariable = new Variable(
variable.id, variable.id,

View file

@ -32,9 +32,9 @@ class StringUtil {
const index = text.indexOf(separator); const index = text.indexOf(separator);
if (index >= 0) { if (index >= 0) {
return [text.substring(0, index), text.substring(index + 1)]; return [text.substring(0, index), text.substring(index + 1)];
} else {
return [text, null];
} }
return [text, null];
} }
} }