diff --git a/.eslintrc.json b/.eslintrc.json index f417d1f2e7..254af69a4f 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -16,6 +16,7 @@ }, "rules": { "dot-notation": [ "error", { "allowKeywords": true } ], + "max-statements-per-line": [ "error", { "max": 1 } ], "max-len": 0, "valid-jsdoc": 0 } diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWLanguageVariantNode.js b/modules/ve-mw/dm/nodes/ve.dm.MWLanguageVariantNode.js index 911b6b8177..9fd640942c 100644 --- a/modules/ve-mw/dm/nodes/ve.dm.MWLanguageVariantNode.js +++ b/modules/ve-mw/dm/nodes/ve.dm.MWLanguageVariantNode.js @@ -359,10 +359,20 @@ ve.dm.MWLanguageVariantNode.prototype.getRuleType = function () { * @return {string} */ ve.dm.MWLanguageVariantNode.static.getRuleType = function ( variantInfo ) { - if ( variantInfo.disabled ) { return 'disabled'; } - if ( variantInfo.filter ) { return 'filter'; } - if ( variantInfo.name ) { return 'name'; } - if ( variantInfo.twoway ) { return 'twoway'; } - if ( variantInfo.oneway ) { return 'oneway'; } + if ( variantInfo.disabled ) { + return 'disabled'; + } + if ( variantInfo.filter ) { + return 'filter'; + } + if ( variantInfo.name ) { + return 'name'; + } + if ( variantInfo.twoway ) { + return 'twoway'; + } + if ( variantInfo.oneway ) { + return 'oneway'; + } return 'unknown'; // should never happen }; diff --git a/modules/ve-mw/tests/ce/ve.ce.Surface.test.js b/modules/ve-mw/tests/ce/ve.ce.Surface.test.js index 29e0f03300..ac47ace426 100644 --- a/modules/ve-mw/tests/ce/ve.ce.Surface.test.js +++ b/modules/ve-mw/tests/ce/ve.ce.Surface.test.js @@ -60,7 +60,9 @@ QUnit.test( 'handleLinearDelete', function ( assert ) { } ); } ); - promise.finally( function () { done(); } ); + promise.finally( function () { + done(); + } ); } ); QUnit.test( 'beforePaste/afterPaste', function ( assert ) { diff --git a/modules/ve-mw/tests/ve.test.utils.js b/modules/ve-mw/tests/ve.test.utils.js index 17533fd061..e846e70420 100644 --- a/modules/ve-mw/tests/ve.test.utils.js +++ b/modules/ve-mw/tests/ve.test.utils.js @@ -25,7 +25,9 @@ this.imageInfoCache = null; } OO.inheritClass( MWDummyPlatform, ve.init.mw.Platform ); - MWDummyPlatform.prototype.getMessage = function () { return Array.prototype.join.call( arguments, ',' ); }; + MWDummyPlatform.prototype.getMessage = function () { + return Array.prototype.join.call( arguments, ',' ); + }; MWDummyPlatform.prototype.getHtmlMessage = function () { var $wrapper = $( '