mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-23 15:37:50 +01:00
lint: infix spacing
This commit is contained in:
parent
ea7720a7de
commit
5e282ac7b4
@ -59,6 +59,7 @@ module.exports = {
|
|||||||
'eol-last': ['error', 'always'],
|
'eol-last': ['error', 'always'],
|
||||||
'no-trailing-spaces': 'error',
|
'no-trailing-spaces': 'error',
|
||||||
'object-curly-spacing': ['error', 'always'],
|
'object-curly-spacing': ['error', 'always'],
|
||||||
|
'space-infix-ops': 'error',
|
||||||
|
|
||||||
// These rules should eventually be enabled.
|
// These rules should eventually be enabled.
|
||||||
'no-async-promise-executor': 'off',
|
'no-async-promise-executor': 'off',
|
||||||
|
@ -2,7 +2,7 @@ import { chat_metadata, getCurrentChatId, saveSettingsDebounced, sendSystemMessa
|
|||||||
import { extension_settings, saveMetadataDebounced } from './extensions.js';
|
import { extension_settings, saveMetadataDebounced } from './extensions.js';
|
||||||
import { executeSlashCommands, registerSlashCommand } from './slash-commands.js';
|
import { executeSlashCommands, registerSlashCommand } from './slash-commands.js';
|
||||||
|
|
||||||
function getLocalVariable(name, args={}) {
|
function getLocalVariable(name, args = {}) {
|
||||||
if (!chat_metadata.variables) {
|
if (!chat_metadata.variables) {
|
||||||
chat_metadata.variables = {};
|
chat_metadata.variables = {};
|
||||||
}
|
}
|
||||||
@ -30,7 +30,7 @@ function setLocalVariable(name, value) {
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getGlobalVariable(name, args={}) {
|
function getGlobalVariable(name, args = {}) {
|
||||||
let globalVariable = extension_settings.variables.global[name];
|
let globalVariable = extension_settings.variables.global[name];
|
||||||
if (args.index !== undefined) {
|
if (args.index !== undefined) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user