summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauri Eskola2018-07-20 05:25:36 (GMT)
committerAlex Pott2018-07-20 18:55:29 (GMT)
commite0feb5b1f1be551639c301369dcba6965417316b (patch)
tree131ae4f7391687d026130f82e27a4e6eeff9e0d9
parent5fd1248e560cba444fdbcc002a9bdf54df66ef51 (diff)
Issue #2983377 by ApacheEx, anmolgoyal74, drpal, m1r1k: JS codestyle: implicit-arrow-linebreak
(cherry picked from commit 29a2728ebb089c9df00a94d2f596609d666018c6)
-rw-r--r--core/.eslintrc.passing.json1
-rw-r--r--core/misc/form.es6.js5
-rw-r--r--core/modules/block/js/block.es6.js10
3 files changed, 10 insertions, 6 deletions
diff --git a/core/.eslintrc.passing.json b/core/.eslintrc.passing.json
index 449ec70..3e52679 100644
--- a/core/.eslintrc.passing.json
+++ b/core/.eslintrc.passing.json
@@ -11,7 +11,6 @@
"operator-linebreak": "off",
"react/no-this-in-sfc": "off",
"react/destructuring-assignment": "off",
- "implicit-arrow-linebreak": "off",
"import/named": "off"
}
}
diff --git a/core/misc/form.es6.js b/core/misc/form.es6.js
index 9afc7a1..ac59039 100644
--- a/core/misc/form.es6.js
+++ b/core/misc/form.es6.js
@@ -154,10 +154,11 @@
* Array of IDs for form fields.
*/
function fieldsList(form) {
- const $fieldList = $(form).find('[name]').map((index, element) =>
+ const $fieldList = $(form).find('[name]').map(
// We use id to avoid name duplicates on radio fields and filter out
// elements with a name but no id.
- element.getAttribute('id'));
+ (index, element) => element.getAttribute('id'),
+ );
// Return a true array.
return $.makeArray($fieldList);
}
diff --git a/core/modules/block/js/block.es6.js b/core/modules/block/js/block.es6.js
index 1bc5bd3..7bdbab0 100644
--- a/core/modules/block/js/block.es6.js
+++ b/core/modules/block/js/block.es6.js
@@ -136,13 +136,17 @@
// Calculate minimum weight.
let weight = -Math.round(table.find('.draggable').length / 2);
// Update the block weights.
- table.find(`.region-${region}-message`).nextUntil('.region-title')
- .find('select.block-weight').val(() =>
+ table
+ .find(`.region-${region}-message`)
+ .nextUntil('.region-title')
+ .find('select.block-weight')
+ .val(
// Increment the weight before assigning it to prevent using the
// absolute minimum available weight. This way we always have an
// unused upper and lower bound, which makes manually setting the
// weights easier for users who prefer to do it that way.
- ++weight);
+ () => ++weight,
+ );
}
const table = $('#blocks');