eslint 8.57 WIP:
* tweaking rules * fixing issues
This commit is contained in:
@ -13,7 +13,7 @@ let singleton: BotConfiguration | undefined
|
||||
|
||||
type RoomConfCache =
|
||||
null // already loaded, but file does not exist
|
||||
| RoomConf // loaded, and contains the room conf
|
||||
| RoomConf // loaded, and contains the room conf
|
||||
|
||||
type ChannelCommonRoomConf = Omit<RoomConf, 'local' | 'domain'>
|
||||
|
||||
|
@ -187,8 +187,8 @@ function _getForbiddenWordsHandler (
|
||||
} else {
|
||||
// Here we must add word-breaks and escape entries.
|
||||
// We join all entries in one Regexp (for the same reason as above).
|
||||
rule.regexp = '(?:' +
|
||||
forbiddenWords.entries.map(s => {
|
||||
rule.regexp = '(?:' + forbiddenWords.entries.map(
|
||||
s => {
|
||||
s = _stringToWordRegexp(s)
|
||||
// Must add the \b...
|
||||
// ... but... won't work if the first (or last) char is an emoji.
|
||||
@ -201,7 +201,8 @@ function _getForbiddenWordsHandler (
|
||||
}
|
||||
// FIXME: this solution wont work for non-latin charsets.
|
||||
return s
|
||||
}).join(')|(?:') + ')'
|
||||
}
|
||||
).join(')|(?:') + ')'
|
||||
}
|
||||
|
||||
if (forbiddenWords.reason) {
|
||||
|
@ -234,14 +234,14 @@ async function _connectionInfos (
|
||||
params: GetConverseJSParamsParams,
|
||||
roomInfos: RoomInfos
|
||||
): Promise<{
|
||||
prosodyDomain: string
|
||||
localAnonymousJID: string
|
||||
localBoshUri: string
|
||||
localWsUri: string | null
|
||||
remoteConnectionInfos: WCRemoteConnectionInfos | undefined
|
||||
roomJID: string
|
||||
customEmojisUrl?: string
|
||||
} | InitConverseJSParamsError> {
|
||||
prosodyDomain: string
|
||||
localAnonymousJID: string
|
||||
localBoshUri: string
|
||||
localWsUri: string | null
|
||||
remoteConnectionInfos: WCRemoteConnectionInfos | undefined
|
||||
roomJID: string
|
||||
customEmojisUrl?: string
|
||||
} | InitConverseJSParamsError> {
|
||||
const { video, remoteChatInfos, channelId, roomKey } = roomInfos
|
||||
|
||||
const prosodyDomain = await getProsodyDomain(options)
|
||||
|
@ -27,11 +27,11 @@ interface DebugContent {
|
||||
}
|
||||
|
||||
type DebugNumericValue = 'renewCertCheckInterval'
|
||||
| 'renewSelfSignedCertInterval'
|
||||
| 'logRotateEvery'
|
||||
| 'logRotateCheckInterval'
|
||||
| 'remoteServerInfosMaxAge'
|
||||
| 'externalAccountPruneInterval'
|
||||
| 'renewSelfSignedCertInterval'
|
||||
| 'logRotateEvery'
|
||||
| 'logRotateCheckInterval'
|
||||
| 'remoteServerInfosMaxAge'
|
||||
| 'externalAccountPruneInterval'
|
||||
|
||||
type DebugBooleanValue = 'alwaysPublishXMPPRoom' | 'enablePodcastChatTagForNonLive' | 'useOpenSSL'
|
||||
|
||||
|
@ -48,7 +48,8 @@ export async function diagProsody (test: string, options: RegisterServerOptions)
|
||||
if (process.arch !== 'x64' && process.arch !== 'x86_64' && process.arch !== 'arm64') {
|
||||
result.messages.push({
|
||||
level: 'error',
|
||||
message: 'Error: your CPU is a ' +
|
||||
message:
|
||||
'Error: your CPU is a ' +
|
||||
process.arch + ', ' +
|
||||
'which is not compatible with the plugin. ' +
|
||||
'Please read the plugin installation documentation for a workaround.'
|
||||
|
@ -3,8 +3,8 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
type NextValue = 'backend' | 'debug' | 'webchat-video' | 'prosody'
|
||||
| 'external-auth-custom-oidc' | 'external-auth-google-oidc' | 'external-auth-facebook-oidc'
|
||||
| 'everything-ok'
|
||||
| 'external-auth-custom-oidc' | 'external-auth-google-oidc' | 'external-auth-facebook-oidc'
|
||||
| 'everything-ok'
|
||||
|
||||
interface MessageWithLevel {
|
||||
level: 'info' | 'warning' | 'error'
|
||||
|
@ -78,12 +78,13 @@ export class Emojis {
|
||||
if (!await this.channelHasCustomEmojis(channelId)) {
|
||||
return undefined
|
||||
}
|
||||
const route = getBaseRouterRoute(this.options) +
|
||||
'emojis/channel/' +
|
||||
encodeURIComponent(channelId) +
|
||||
'/definition'
|
||||
return canonicalizePluginUri(
|
||||
this.options,
|
||||
getBaseRouterRoute(this.options) +
|
||||
'emojis/channel/' +
|
||||
encodeURIComponent(channelId) +
|
||||
'/definition',
|
||||
route,
|
||||
{
|
||||
removePluginVersion: true
|
||||
}
|
||||
|
@ -289,7 +289,7 @@ function _sanitizePeertubeLiveChatInfosV0 (
|
||||
logger.debug('We are have to migrate data from the old JSONLD format')
|
||||
|
||||
if (chatInfos === false) { return false }
|
||||
if (!_assertObjectType(chatInfos)) { return false}
|
||||
if (!_assertObjectType(chatInfos)) { return false }
|
||||
|
||||
if (chatInfos.type !== 'xmpp') { return false }
|
||||
if (typeof chatInfos.jid !== 'string') { return false }
|
||||
|
@ -529,7 +529,7 @@ function initThemingSettings ({ registerSetting }: RegisterServerOptions): void
|
||||
{ value: 'peertube', label: loc('converse_theme_option_peertube') },
|
||||
{ value: 'default', label: loc('converse_theme_option_default') },
|
||||
{ value: 'cyberpunk', label: loc('converse_theme_option_cyberpunk') }
|
||||
] as Array<{value: ConverseJSTheme, label: string}>,
|
||||
] as Array<{ value: ConverseJSTheme, label: string }>,
|
||||
descriptionHTML: loc('converse_theme_description')
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user