mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-21 16:00:26 +01:00
ESlint no-continue
This commit is contained in:
@@ -109,7 +109,7 @@
|
|||||||
"newline-per-chained-call": "off",
|
"newline-per-chained-call": "off",
|
||||||
"array-bracket-spacing": "off",
|
"array-bracket-spacing": "off",
|
||||||
"object-property-newline": "off",
|
"object-property-newline": "off",
|
||||||
"no-continue": "off",
|
// "no-continue": "off",
|
||||||
// "no-extra-semi": "off",
|
// "no-extra-semi": "off",
|
||||||
// "no-spaced-func": "off",
|
// "no-spaced-func": "off",
|
||||||
// "no-useless-return": "off"
|
// "no-useless-return": "off"
|
||||||
|
|||||||
@@ -228,14 +228,13 @@ define('forum/category', [
|
|||||||
if (numTopics > 0) {
|
if (numTopics > 0) {
|
||||||
for (var x = 0; x < numTopics; x++) {
|
for (var x = 0; x < numTopics; x++) {
|
||||||
var pinned = $(topics[x]).hasClass('pinned');
|
var pinned = $(topics[x]).hasClass('pinned');
|
||||||
if (pinned) {
|
if (!pinned) {
|
||||||
if(x === numTopics - 1) {
|
topic.insertBefore(topics[x]);
|
||||||
topic.insertAfter(topics[x]);
|
break;
|
||||||
}
|
}
|
||||||
continue;
|
if(x === numTopics - 1) {
|
||||||
|
topic.insertAfter(topics[x]);
|
||||||
}
|
}
|
||||||
topic.insertBefore(topics[x]);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
container.append(topic);
|
container.append(topic);
|
||||||
|
|||||||
@@ -447,33 +447,28 @@
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
if (typeof String.prototype.startsWith != 'function') {
|
if (typeof String.prototype.startsWith !== 'function') {
|
||||||
String.prototype.startsWith = function (prefix) {
|
String.prototype.startsWith = function (prefix) {
|
||||||
if (this.length < prefix.length) {
|
if (this.length < prefix.length) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (var i = prefix.length - 1; (i >= 0) && (this[i] === prefix[i]); --i) {
|
return this.slice(0, prefix.length) === prefix;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
return i < 0;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof String.prototype.endsWith != 'function') {
|
if (typeof String.prototype.endsWith !== 'function') {
|
||||||
String.prototype.endsWith = function (suffix) {
|
String.prototype.endsWith = function (suffix) {
|
||||||
if (this.length < suffix.length) {
|
if (this.length < suffix.length) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var len = this.length;
|
if (suffix.length === 0) {
|
||||||
var suffixLen = suffix.length;
|
return true;
|
||||||
for (var i = 1; (i <= suffixLen && this[len - i] === suffix[suffixLen - i]); ++i) {
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
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 () {
|
String.prototype.rtrim = function () {
|
||||||
return this.replace(/\s+$/g, '');
|
return this.replace(/\s+$/g, '');
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user