Add keyword-spacing rule to eslint

This commit is contained in:
Rachel Fenichel
2018-03-19 13:10:25 -07:00
parent 3f77ceb823
commit 6d83b9bc28
5 changed files with 5 additions and 4 deletions

View File

@@ -24,6 +24,7 @@
"ignoredNodes": ["ConditionalExpression"]
}
],
"keyword-spacing": ["error"],
"linebreak-style": ["error", "unix"],
"max-len": [
"error",

View File

@@ -103,7 +103,7 @@ Blockly.Constants.Variables.CUSTOM_CONTEXT_MENU_VARIABLE_GETTER_SETTER_MIXIN = {
* @this Blockly.Block
*/
customContextMenu: function(options) {
if(this.isInFlyout){
if (this.isInFlyout){
return;
}
// Getter blocks have the option to create a setter block, and vice versa.

View File

@@ -1197,7 +1197,7 @@ Blockly.Block.prototype.interpolate_ = function(message, args, lastDummyAlign) {
}
}
}
if(indexCount != args.length) {
if (indexCount != args.length) {
throw new Error('Block "' + this.type + '": ' +
'Message does not reference all ' + args.length + ' arg(s).');
}

View File

@@ -611,7 +611,7 @@ Blockly.Flyout.prototype.createBlock = function(originalBlock) {
Blockly.Events.setGroup(true);
Blockly.Events.fire(new Blockly.Events.Create(newBlock));
// Fire a VarCreate event for each (if any) new variable created.
for(var i = 0; i < newVariables.length; i++) {
for (var i = 0; i < newVariables.length; i++) {
var thisVariable = newVariables[i];
Blockly.Events.fire(new Blockly.Events.VarCreate(thisVariable));
}

View File

@@ -549,7 +549,7 @@ Blockly.Xml.domToBlock = function(xmlBlock, workspace) {
var newVariables = Blockly.Variables.getAddedVariables(workspace,
variablesBeforeCreation);
// Fire a VarCreate event for each (if any) new variable created.
for(var i = 0; i < newVariables.length; i++) {
for (var i = 0; i < newVariables.length; i++) {
var thisVariable = newVariables[i];
Blockly.Events.fire(new Blockly.Events.VarCreate(thisVariable));
}