eslint: change array-callback-return from warning to error.

This commit is contained in:
lonerz 2016-12-05 06:53:36 +00:00 committed by Tim Abbott
parent 690d72d35f
commit abde152d9c
2 changed files with 7 additions and 3 deletions

View File

@ -120,7 +120,7 @@
"numbers": false "numbers": false
}], }],
"no-array-constructor": "error", "no-array-constructor": "error",
"array-callback-return": 1, "array-callback-return": "error",
"template-curly-spacing": "error", "template-curly-spacing": "error",
"no-useless-escape": 1, "no-useless-escape": 1,
"func-style": ["off", "expression"], "func-style": ["off", "expression"],

View File

@ -792,7 +792,9 @@ function _setup_page() {
e.stopPropagation(); e.stopPropagation();
var emoji_status = $('#admin-emoji-status'); var emoji_status = $('#admin-emoji-status');
var emoji = {}; var emoji = {};
$(this).serializeArray().map(function (x) {emoji[x.name] = x.value;}); _.each($(this).serializeArray(), function (obj) {
emoji[obj.name] = obj.value;
});
channel.put({ channel.put({
url: "/json/realm/emoji", url: "/json/realm/emoji",
@ -844,7 +846,9 @@ function _setup_page() {
pattern_status.hide(); pattern_status.hide();
format_status.hide(); format_status.hide();
var filter = {}; var filter = {};
$(this).serializeArray().map(function (x) {filter[x.name] = x.value;}); _.each($(this).serializeArray(), function (obj) {
filter[obj.name] = obj.value;
});
channel.post({ channel.post({
url: "/json/realm/filters", url: "/json/realm/filters",