ESlint no-continue

v1.18.x
Peter Jaszkowiak 8 years ago
parent d9c1f6f088
commit 554075b312

@ -109,7 +109,7 @@
"newline-per-chained-call": "off",
"array-bracket-spacing": "off",
"object-property-newline": "off",
"no-continue": "off",
// "no-continue": "off",
// "no-extra-semi": "off",
// "no-spaced-func": "off",
// "no-useless-return": "off"

@ -228,14 +228,13 @@ define('forum/category', [
if (numTopics > 0) {
for (var x = 0; x < numTopics; x++) {
var pinned = $(topics[x]).hasClass('pinned');
if (pinned) {
if(x === numTopics - 1) {
topic.insertAfter(topics[x]);
}
continue;
if (!pinned) {
topic.insertBefore(topics[x]);
break;
}
if(x === numTopics - 1) {
topic.insertAfter(topics[x]);
}
topic.insertBefore(topics[x]);
break;
}
} else {
container.append(topic);

@ -447,33 +447,28 @@
},
};
if (typeof String.prototype.startsWith != 'function') {
if (typeof String.prototype.startsWith !== 'function') {
String.prototype.startsWith = function (prefix) {
if (this.length < prefix.length) {
return false;
}
for (var i = prefix.length - 1; (i >= 0) && (this[i] === prefix[i]); --i) {
continue;
}
return i < 0;
return this.slice(0, prefix.length) === prefix;
};
}
if (typeof String.prototype.endsWith != 'function') {
if (typeof String.prototype.endsWith !== 'function') {
String.prototype.endsWith = function (suffix) {
if (this.length < suffix.length) {
return false;
}
var len = this.length;
var suffixLen = suffix.length;
for (var i = 1; (i <= suffixLen && this[len - i] === suffix[suffixLen - i]); ++i) {
continue;
if (suffix.length === 0) {
return true;
}
return i > suffixLen;
return this.slice(-suffix.length) === suffix;
};
}
if (typeof String.prototype.rtrim != 'function') {
if (typeof String.prototype.rtrim !== 'function') {
String.prototype.rtrim = function () {
return this.replace(/\s+$/g, '');
};

Loading…
Cancel
Save