diff --git a/.eslintrc.js b/.eslintrc.js index 8d9e36fe3..8d8386505 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -59,15 +59,18 @@ module.exports = { }, }, ], - // There are various vendored libraries that shouldn't be linted ignorePatterns: [ - 'public/lib/**/*', - '*.min.js', - 'src/ai_horde/**/*', - 'plugins/**/*', - 'data/**/*', - 'backups/**/*', - 'node_modules/**/*', + '**/node_modules/**', + '**/dist/**', + '**/.git/**', + 'public/lib/**', + 'backups/**', + 'data/**', + 'cache/**', + 'src/tokenizers/**', + 'docker/**', + 'plugins/**', + '**/*.min.js', ], rules: { 'no-unused-vars': ['error', { args: 'none' }], diff --git a/jsconfig.json b/jsconfig.json index a48606f1f..0e554015b 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -11,15 +11,14 @@ "resolveJsonModule": true }, "exclude": [ - "node_modules", - "**/node_modules/*", - "public/lib", - "backups/*", - "data/*", - "**/dist/*", - "dist/*", - "cache/*", - "src/tokenizers/*", - "docker/*", + "**/node_modules/**", + "**/dist/**", + "**/.git/**", + "public/lib/**", + "backups/**", + "data/**", + "cache/**", + "src/tokenizers/**", + "docker/**" ] } diff --git a/public/script.js b/public/script.js index 2acdcc02b..710526f3b 100644 --- a/public/script.js +++ b/public/script.js @@ -2029,7 +2029,7 @@ export function messageFormatting(mes, ch_name, isSystem, isUser, messageId, san // Return the original match if no quotes are found return match; } - } + }, ); // Restore double quotes in tags diff --git a/public/scripts/instruct-mode.js b/public/scripts/instruct-mode.js index ba641935f..c5b70ac52 100644 --- a/public/scripts/instruct-mode.js +++ b/public/scripts/instruct-mode.js @@ -554,11 +554,9 @@ export function formatInstructModePrompt(name, isImpersonate, promptBias, name1, * @param {string} name Preset name. */ function selectMatchingContextTemplate(name) { - let foundMatch = false; for (const context_preset of context_presets) { // If context template matches the instruct preset if (context_preset.name === name) { - foundMatch = true; selectContextPreset(context_preset.name, { isAuto: true }); break; } diff --git a/public/scripts/openai.js b/public/scripts/openai.js index 7a9ea9368..3d8355216 100644 --- a/public/scripts/openai.js +++ b/public/scripts/openai.js @@ -1715,7 +1715,6 @@ async function sendOpenAIRequest(type, messages, signal) { messages = messages.filter(msg => msg && typeof msg === 'object'); let logit_bias = {}; - const messageId = getNextMessageId(type); const isClaude = oai_settings.chat_completion_source == chat_completion_sources.CLAUDE; const isOpenRouter = oai_settings.chat_completion_source == chat_completion_sources.OPENROUTER; const isScale = oai_settings.chat_completion_source == chat_completion_sources.SCALE; diff --git a/src/endpoints/novelai.js b/src/endpoints/novelai.js index 2d7e6887d..e2c6fef19 100644 --- a/src/endpoints/novelai.js +++ b/src/endpoints/novelai.js @@ -51,7 +51,7 @@ const eratoRepPenWhitelist = [ 6, 1, 11, 13, 25, 198, 12, 9, 8, 279, 264, 459, 323, 477, 539, 912, 374, 574, 1051, 1550, 1587, 4536, 5828, 15058, 3287, 3250, 1461, 1077, 813, 11074, 872, 1202, 1436, 7846, 1288, 13434, 1053, 8434, 617, 9167, 1047, 19117, 706, 12775, 649, 4250, 527, 7784, 690, 2834, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 1210, 1359, 608, 220, 596, 956, - 3077, 44886, 4265, 3358, 2351, 2846, 311, 389, 315, 304, 520, 505, 430 + 3077, 44886, 4265, 3358, 2351, 2846, 311, 389, 315, 304, 520, 505, 430, ]; // Ban the dinkus and asterism diff --git a/src/prompt-converters.js b/src/prompt-converters.js index d3e910859..38ac48f35 100644 --- a/src/prompt-converters.js +++ b/src/prompt-converters.js @@ -563,7 +563,7 @@ function convertMistralMessages(messages, charName = '', userName = '') { } }); } - } + }; fixToolMessages(); // If system role message immediately follows an assistant message, change its role to user