Enable no-extra-semi lint
This commit is contained in:
parent
27e63a7a77
commit
0a27275772
|
@ -56,7 +56,6 @@ module.exports = {
|
|||
'no-redeclare': 'off',
|
||||
'no-async-promise-executor': 'off',
|
||||
'no-inner-declarations': 'off',
|
||||
'no-extra-semi': 'off',
|
||||
'no-undef': 'off',
|
||||
'no-prototype-builtins': 'off',
|
||||
'no-extra-boolean-cast': 'off',
|
||||
|
|
|
@ -3835,7 +3835,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
|
|||
triggerAutoContinue(messageChunk, isImpersonate);
|
||||
resolve();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function onError(exception) {
|
||||
if (typeof exception?.error?.message === 'string') {
|
||||
|
@ -3846,7 +3846,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
|
|||
unblockGeneration();
|
||||
console.log(exception);
|
||||
streamingProcessor = null;
|
||||
};
|
||||
}
|
||||
|
||||
} //rungenerate ends
|
||||
} else { //generate's primary loop ends, after this is error handling for no-connection or safety-id
|
||||
|
@ -7890,7 +7890,7 @@ jQuery(async function () {
|
|||
|
||||
if (popup_type == 'avatarToCrop') {
|
||||
dialogueResolve($("#avatarToCrop").data('cropper').getCroppedCanvas().toDataURL('image/jpeg'));
|
||||
};
|
||||
}
|
||||
|
||||
if (popup_type == "del_chat") {
|
||||
//close past chat popup
|
||||
|
@ -9171,7 +9171,7 @@ jQuery(async function () {
|
|||
$(document).on('click', '.inline-drawer-toggle', function (e) {
|
||||
if ($(e.target).hasClass('text_pole')) {
|
||||
return;
|
||||
};
|
||||
}
|
||||
var icon = $(this).find('.inline-drawer-icon');
|
||||
icon.toggleClass('down up');
|
||||
icon.toggleClass('fa-circle-chevron-down fa-circle-chevron-up');
|
||||
|
|
|
@ -691,7 +691,7 @@ async function onDeleteClick() {
|
|||
if (confirmation) {
|
||||
await deleteExtension(extensionName);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export async function deleteExtension(extensionName) {
|
||||
try {
|
||||
|
|
|
@ -2416,7 +2416,7 @@ async function sdMessageButton(e) {
|
|||
|
||||
context.saveChat();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
$("#sd_dropdown [id]").on("click", function () {
|
||||
const id = $(this).attr("id");
|
||||
|
|
|
@ -124,4 +124,4 @@ export function initLocales() {
|
|||
|
||||
registerDebugFunction('getMissingTranslations', 'Get missing translations', 'Detects missing localization data and dumps the data into the browser console.', getMissingTranslations);
|
||||
registerDebugFunction('applyLocale', 'Apply locale', 'Reapplies the currently selected locale to the page.', applyLocale);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1860,7 +1860,7 @@ class Message {
|
|||
* Returns the number of tokens in the message.
|
||||
* @returns {number} Number of tokens in the message.
|
||||
*/
|
||||
getTokens() { return this.tokens };
|
||||
getTokens() { return this.tokens }
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2239,14 +2239,14 @@ class ChatCompletion {
|
|||
reserveBudget(message) {
|
||||
const tokens = typeof message === 'number' ? message : message.getTokens();
|
||||
this.decreaseTokenBudgetBy(tokens);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Frees up the tokens used by the given message from the token budget.
|
||||
*
|
||||
* @param {Message|MessageCollection} message - The message whose tokens to free.
|
||||
*/
|
||||
freeBudget(message) { this.increaseTokenBudgetBy(message.getTokens()) };
|
||||
freeBudget(message) { this.increaseTokenBudgetBy(message.getTokens()) }
|
||||
|
||||
/**
|
||||
* Increases the token budget by the given number of tokens.
|
||||
|
|
|
@ -834,7 +834,7 @@ async function CreateZenSliders(elmnt) {
|
|||
originalSlider.data("newSlider", newSlider);
|
||||
await delay(1)
|
||||
originalSlider.hide();
|
||||
};
|
||||
}
|
||||
function switchUiMode() {
|
||||
const fastUi = localStorage.getItem(storage_keys.fast_ui_mode);
|
||||
power_user.fast_ui_mode = fastUi === null ? true : fastUi == "true";
|
||||
|
@ -894,7 +894,7 @@ function switchMovingUI() {
|
|||
if (power_user.movingUIState) {
|
||||
loadMovingUIState();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function noShadows() {
|
||||
|
@ -1239,7 +1239,7 @@ async function applyTheme(name) {
|
|||
if (type) await applyThemeColor(type);
|
||||
if (action) await action();
|
||||
} else {
|
||||
if (selector) { $(selector).attr('color', 'rgba(0,0,0,0)') };
|
||||
if (selector) { $(selector).attr('color', 'rgba(0,0,0,0)') }
|
||||
console.debug(`Empty theme key: ${key}`);
|
||||
power_user[key] = '';
|
||||
}
|
||||
|
@ -2985,7 +2985,7 @@ $(document).ready(() => {
|
|||
if (power_user.enableZenSliders === true && value === true) {
|
||||
//disallow Lab Mode if ZenSliders are active
|
||||
toastr.warning('Disable Zen Sliders before enabling Mad Lab Mode')
|
||||
$(this).prop('checked', false).trigger('input');;
|
||||
$(this).prop('checked', false).trigger('input');
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -261,7 +261,7 @@ async function importTags(imported_char) {
|
|||
tag_map[imported_char.avatar].push(tag.id);
|
||||
console.debug('added tag to map', tag, imported_char.name);
|
||||
}
|
||||
};
|
||||
}
|
||||
saveSettingsDebounced();
|
||||
await getCharacters();
|
||||
printTagFilters(tag_filter_types.character);
|
||||
|
|
|
@ -244,7 +244,7 @@ export function getStringHash(str, seed = 0) {
|
|||
h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507) ^ Math.imul(h1 ^ (h1 >>> 13), 3266489909);
|
||||
|
||||
return 4294967296 * (2097151 & h2) + (h1 >>> 0);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a debounced function that delays invoking func until after wait milliseconds have elapsed since the last time the debounced function was invoked.
|
||||
|
@ -344,7 +344,7 @@ export function incrementString(str) {
|
|||
// Take the substring up until where the integer was matched
|
||||
// Concatenate it to the matched count incremented by 1
|
||||
return str.substring(0, count.index) + (Number(count[0]) + 1);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats a string using the specified arguments.
|
||||
|
@ -361,7 +361,7 @@ export function stringFormat(format) {
|
|||
: match
|
||||
;
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the caret position in a contenteditable element.
|
||||
|
|
|
@ -133,7 +133,7 @@ export function replaceVariableMacros(input) {
|
|||
// Replace {{addvar::name::value}} with empty string and add value to the variable value
|
||||
line = line.replace(/{{addvar::([^:]+)::([^}]+)}}/gi, (_, name, value) => {
|
||||
name = name.trim();
|
||||
addLocalVariable(name, value);;
|
||||
addLocalVariable(name, value);
|
||||
return '';
|
||||
});
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ function humanizedISO8601DateTime(date) {
|
|||
let humanMillisecond = (baseDate.getMilliseconds() < 10 ? '0' : '') + baseDate.getMilliseconds();
|
||||
let HumanizedDateTime = (humanYear + "-" + humanMonth + "-" + humanDate + " @" + humanHour + "h " + humanMinute + "m " + humanSecond + "s " + humanMillisecond + "ms");
|
||||
return HumanizedDateTime;
|
||||
};
|
||||
}
|
||||
|
||||
var charactersPath = 'public/characters/';
|
||||
var chatsPath = 'public/chats/';
|
||||
|
|
|
@ -35,7 +35,7 @@ function checkAssetFileName(inputFilename) {
|
|||
return '';
|
||||
}
|
||||
|
||||
return path.normalize(inputFilename).replace(/^(\.\.(\/|\\|$))+/, '');;
|
||||
return path.normalize(inputFilename).replace(/^(\.\.(\/|\\|$))+/, '');
|
||||
}
|
||||
|
||||
// Recursive function to get files
|
||||
|
|
Loading…
Reference in New Issue