Enable no-extra-boolean-cast lint

This commit is contained in:
valadaptive 2023-12-02 10:15:47 -05:00
parent 0a27275772
commit 97c49a405b
5 changed files with 6 additions and 7 deletions

View File

@ -58,7 +58,6 @@ module.exports = {
'no-inner-declarations': 'off',
'no-undef': 'off',
'no-prototype-builtins': 'off',
'no-extra-boolean-cast': 'off',
'require-yield': 'off',
'no-constant-condition': ['error', {checkLoops: false}]
}

View File

@ -819,7 +819,7 @@ export function initRossMods() {
//console.log('setting pin class via local var');
$(RightNavPanel).addClass('pinnedOpen');
}
if (!!$(RPanelPin).prop('checked')) {
if ($(RPanelPin).prop('checked')) {
console.debug('setting pin class via checkbox state');
$(RightNavPanel).addClass('pinnedOpen');
}
@ -829,7 +829,7 @@ export function initRossMods() {
//console.log('setting pin class via local var');
$(LeftNavPanel).addClass('pinnedOpen');
}
if (!!$(LPanelPin).prop('checked')) {
if ($(LPanelPin).prop('checked')) {
console.debug('setting pin class via checkbox state');
$(LeftNavPanel).addClass('pinnedOpen');
}
@ -841,7 +841,7 @@ export function initRossMods() {
$(WorldInfo).addClass('pinnedOpen');
}
if (!!$(WIPanelPin).prop('checked')) {
if ($(WIPanelPin).prop('checked')) {
console.debug('setting pin class via checkbox state');
$(WorldInfo).addClass('pinnedOpen');
}

View File

@ -1277,7 +1277,7 @@ function select_group_chats(groupId, skipAnimation) {
const replyStrategy = Number(group?.activation_strategy ?? group_activation_strategy.NATURAL);
const generationMode = Number(group?.generation_mode ?? group_generation_mode.SWAP);
setMenuType(!!group ? 'group_edit' : 'group_create');
setMenuType(group ? 'group_edit' : 'group_create');
$("#group_avatar_preview").empty().append(getGroupAvatar(group));
$("#rm_group_restore_avatar").toggle(!!group && isValidImageUrl(group.avatar_url));
$("#rm_group_filter").val("").trigger("input");

View File

@ -855,7 +855,7 @@ function getWorldEntry(name, data, entry) {
// Character filter
const characterFilterLabel = template.find(`label[for="characterFilter"] > small`);
characterFilterLabel.text(!!(entry.characterFilter?.isExclude) ? "Exclude Character(s)" : "Filter to Character(s)");
characterFilterLabel.text(entry.characterFilter?.isExclude ? "Exclude Character(s)" : "Filter to Character(s)");
// exclude characters checkbox
const characterExclusionInput = template.find(`input[name="character_exclusion"]`);

View File

@ -464,7 +464,7 @@ app.post("/generate", jsonParser, async function (request, response_generate) {
grammar: request.body.grammar,
sampler_seed: request.body.sampler_seed,
};
if (!!request.body.stop_sequence) {
if (request.body.stop_sequence) {
this_settings['stop_sequence'] = request.body.stop_sequence;
}
}