Merge pull request #3243 from valadaptive/no-unneeded-ternary Enable no-unneeded-ternary ESLint rule

6432adaf3c16c5356212c975c5a253f77e55d8bd

Cohee <18619528+Cohee1207@users.noreply.github.com>

Signed
3 files changed, +3 -2Showing whitespace changes
.eslintrc.cjs+1 -0
@@ -91,6 +91,7 @@ module.exports = {
9191 'space-infix-ops': 'error',
9292 'no-unused-expressions': ['error', { allowShortCircuit: true, allowTernary: true }],
9393 'no-cond-assign': 'error',
94+ 'no-unneeded-ternary': 'error',
9495
9596 // These rules should eventually be enabled.
9697 'no-async-promise-executor': 'off',
public/scripts/authors-note.js+1 -1
@@ -440,7 +440,7 @@ async function onChatChanged() {
440440 const context = getContext();
441441
442442 // Disable the chara note if in a group
443443 $('#extension_floating_chara').prop('disabled', !!context.groupId ? true : false);
444444
445445 const tokenCounter1 = chat_metadata[metadata_keys.prompt] ? await getTokenCountAsync(chat_metadata[metadata_keys.prompt]) : 0;
446446 $('#extension_floating_prompt_token_counter').text(tokenCounter1);
public/scripts/world-info.js+1 -1
@@ -4681,7 +4681,7 @@ function convertCharacterBook(characterBook) {
46814681 preventRecursion: entry.extensions?.prevent_recursion ?? false,
46824682 delayUntilRecursion: entry.extensions?.delay_until_recursion ?? false,
46834683 disable: !entry.enabled,
46844684 addMemo: !!entry.comment ? true : false,
46854685 displayIndex: entry.extensions?.display_index ?? index,
46864686 probability: entry.extensions?.probability ?? 100,
46874687 useProbability: entry.extensions?.useProbability ?? true,