refactor: Enable jsdoc/tag-lines and jsdoc/sort-tags rules

This commit is contained in:
Joachim Van Herwegen
2024-03-14 09:29:56 +01:00
parent 3e59aa4b55
commit 65bf2bd34e
89 changed files with 276 additions and 18 deletions

View File

@@ -29,6 +29,7 @@ const bob: User = {
/**
* Registers a user with the server and provides them with a pod.
*
* @param user - The user settings necessary to register a user.
*/
async function register(user: User): Promise<{ webId: string; authorization: string }> {
@@ -78,8 +79,10 @@ async function register(user: User): Promise<{ webId: string; authorization: str
/**
* Requests a client credentials API token.
*
* @param webId - WebID to create credentials for.
* @param authorization - Authorization header for the account that tries to create credentials.
*
* @returns The id/secret for the client credentials request.
*/
async function createCredentials(webId: string, authorization: string): Promise<{ id: string; secret: string }> {
@@ -104,6 +107,7 @@ async function createCredentials(webId: string, authorization: string): Promise<
* Generates all the necessary data and outputs the necessary lines
* that need to be added to the CTH environment file
* so it can use client credentials.
*
* @param user - User for which data needs to be generated.
*/
async function outputCredentials(user: User): Promise<void> {

View File

@@ -28,6 +28,7 @@ export class IdentityTestState {
/**
* Performs a fetch call while keeping track of the stored cookies and preventing redirects.
*
* @param url - URL to call.
* @param method - Method to use.
* @param body - Body to send along. If this is not a string it will be JSONified.

View File

@@ -10,6 +10,7 @@ export type User = {
/**
* Registers an account for the given user details and creates one or more pods.
*
* @param baseUrl - Base URL of the server.
* @param user - User details to register.
*/

View File

@@ -2,6 +2,7 @@ import { fetch } from 'cross-fetch';
/**
* Subscribes to a notification channel.
*
* @param type - The type of the notification channel, e.g., "NOTIFY.WebhookChannel2023".
* @param webId - The WebID to spoof in the authorization header. This assumes the config uses the debug auth import.
* @param subscriptionUrl - The subscription URL to which the request needs to be sent.
@@ -36,6 +37,7 @@ export async function subscribe(
/**
* Verifies if a notification has the expected format.
*
* @param notification - The (parsed) notification.
* @param topic - The topic of the notification.
* @param type - What type of notification is expected.