eslint 8.57 WIP:

* tweaking some more rules.
* fixing linting.
This commit is contained in:
John Livingston
2024-09-09 20:01:25 +02:00
parent c010758164
commit fd27105c2c
34 changed files with 165 additions and 36 deletions

View File

@ -4,7 +4,7 @@
import type { ProsodyAuthentInfos } from 'shared/lib/types'
interface AuthHeader { [key: string]: string }
type AuthHeader = Record<string, string>
async function getLocalAuthentInfos (
authenticationUrl: string,
@ -66,7 +66,7 @@ async function getLocalAuthentInfos (
{
'content-type': 'application/json;charset=UTF-8'
}
)
) as HeadersInit
)
})
@ -104,7 +104,7 @@ async function getLocalAuthentInfos (
function getLivechatTokenAuthInfos (): ProsodyAuthentInfos | undefined {
try {
const hash = window.location.hash
if (!hash || !hash.startsWith('#?')) { return undefined }
if (!hash?.startsWith('#?')) { return undefined }
// We try to read the hash as a queryString.
const u = new URL('http://localhost' + hash.substring(1))
const jid = u.searchParams.get('j')