Enable operator-linebreak rule

This commit is contained in:
Rachel Fenichel
2019-07-31 09:45:27 -07:00
parent afd2b09453
commit 16f0992764
4 changed files with 8 additions and 7 deletions

View File

@@ -67,7 +67,8 @@
"no-redeclare": ["off"],
"valid-jsdoc": ["error", {"requireReturn": false}],
"no-console": ["off"],
"no-multi-spaces": ["error", { "ignoreEOLComments": true }]
"no-multi-spaces": ["error", { "ignoreEOLComments": true }],
"operator-linebreak": ["error", "after"]
},
"env": {
"browser": true

View File

@@ -246,8 +246,8 @@ Blockly.FieldDropdown.prototype.positionMenu_ = function(menu) {
var menuSize = Blockly.utils.uiMenu.getSize(menu);
var menuMaxHeightPx = Blockly.FieldDropdown.MAX_MENU_HEIGHT_VH
* document.documentElement.clientHeight;
var menuMaxHeightPx = Blockly.FieldDropdown.MAX_MENU_HEIGHT_VH *
document.documentElement.clientHeight;
if (menuSize.height > menuMaxHeightPx) {
menuSize.height = menuMaxHeightPx;
}

View File

@@ -405,8 +405,8 @@ Blockly.Trashcan.prototype.animateLid_ = function() {
* @private
*/
Blockly.Trashcan.prototype.setLidAngle_ = function(lidAngle) {
var openAtRight = this.workspace_.toolboxPosition == Blockly.TOOLBOX_AT_RIGHT
|| (this.workspace_.horizontalLayout && this.workspace_.RTL);
var openAtRight = this.workspace_.toolboxPosition == Blockly.TOOLBOX_AT_RIGHT ||
(this.workspace_.horizontalLayout && this.workspace_.RTL);
this.svgLid_.setAttribute('transform', 'rotate(' +
(openAtRight ? -lidAngle : lidAngle) + ',' +
(openAtRight ? 4 : this.WIDTH_ - 4) + ',' +

View File

@@ -7,8 +7,8 @@ suite('Connections', function() {
var connections = block.getConnections_(true);
for (var i = 0; i < connections.length; i++) {
var connection = connections[i];
if (connection.type == Blockly.PREVIOUS_STATEMENT
|| connection.type == Blockly.OUTPUT_VALUE) {
if (connection.type == Blockly.PREVIOUS_STATEMENT ||
connection.type == Blockly.OUTPUT_VALUE) {
// Only superior connections on inputs get hidden
continue;
}