refactor: one eslint task per workspace (#63835)

This commit is contained in:
Oliver Eyton-Williams
2025-11-21 14:51:46 +01:00
committed by GitHub
parent c9e83c5c6a
commit 1e0805fd72
74 changed files with 1813 additions and 2307 deletions
+11 -10
View File
@@ -1,3 +1,4 @@
/* eslint-disable jsdoc/require-jsdoc */
import { beforeAll, afterAll, expect, vi } from 'vitest';
import request from 'supertest';
@@ -46,13 +47,13 @@ export const getCookies = (setCookies: string[]): string => {
* A wrapper around supertest that handles common setup for requests. Namely
* setting the Origin header, cookies and CSRF token.
*
* @param resource - The URL of the resource to be requested
* @param config - The configuration for the request
* @param config.method - The HTTP method to be used
* @param config.setCookies - The cookies to be set in the request
* @param options - Additional options for the request
* @param options.sendCSRFToken - Whether to send the CSRF token in the request (default: true)
* @returns The request object
* @param resource - The URL of the resource to be requested.
* @param config - The configuration for the request.
* @param config.method - The HTTP method to be used.
* @param config.setCookies - The cookies to be set in the request.
* @param options - Additional options for the request.
* @param options.sendCSRFToken - Whether to send the CSRF token in the request (default: true).
* @returns The request object.
*/
export function superRequest(
resource: string,
@@ -83,9 +84,9 @@ export function superRequest(
* request function with the desired method and setCookies baked in.
*
* @param config
* @param config.method - HTTP method
* @param config.setCookies - Cookies to be set in the request
* @returns A superRequest function with the desired method and setCookies
* @param config.method - HTTP method.
* @param config.setCookies - Cookies to be set in the request.
* @returns A superRequest function with the desired method and setCookies.
*/
export function createSuperRequest(config: {
method: 'GET' | 'POST' | 'PUT' | 'DELETE';