mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
fix: 🚨 Fix DeepSource linter warnings
This commit is contained in:
parent
45e5460975
commit
1d301d72ae
10 changed files with 39 additions and 40 deletions
|
|
@ -158,7 +158,7 @@ export class FederationRequester {
|
|||
* Attempt to resolve a webfinger URL to a User
|
||||
* @returns {Promise<User | null>} The resolved User or null if not found
|
||||
*/
|
||||
public async resolveWebFinger(
|
||||
public static async resolveWebFinger(
|
||||
username: string,
|
||||
hostname: string,
|
||||
contentType = "application/json",
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import {
|
|||
oneOrMore,
|
||||
} from "magic-regexp";
|
||||
|
||||
export const semverRegex: RegExp = new RegExp(
|
||||
export const semverRegex = new RegExp(
|
||||
/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/gm,
|
||||
);
|
||||
|
||||
|
|
@ -57,8 +57,8 @@ export const emojiRegex: RegExp = createRegExp(
|
|||
// This will accept a lot of stuff that isn't an ISO string
|
||||
// but ISO validation is incredibly complex so fuck it
|
||||
export const isISOString = (val: string | Date): boolean => {
|
||||
const d = new Date(val);
|
||||
return !Number.isNaN(d.valueOf());
|
||||
const date = new Date(val);
|
||||
return !Number.isNaN(date.valueOf());
|
||||
};
|
||||
|
||||
export const ianaTimezoneRegex = /^(?:[A-Za-z]+(?:\/[A-Za-z_]+)+|UTC)$/;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue