Eslint fix

Summary: Try to fix eslint issues

Reviewers: #reviewers

Subscribers: jenkins-user

Differential Revision: https://hub.sealcode.org/D1426
This commit is contained in:
Kuba Orlik 2024-04-09 13:09:02 +02:00
parent 2df0203148
commit 15c6edf0a7
43 changed files with 136 additions and 129 deletions

View File

@ -4,10 +4,8 @@ module.exports = {
plugins: ["@typescript-eslint", "prettier"],
extends: [
"eslint:recommended",
// disabled due to https://github.com/typescript-eslint/typescript-eslint/issues/8804
// "plugin:@typescript-eslint/recommended",
// disabled due to https://github.com/typescript-eslint/typescript-eslint/issues/8804
// "plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:prettier/recommended",
],
parserOptions: {
@ -15,17 +13,20 @@ module.exports = {
ecmaFeatures: {
modules: true,
},
// disabled due to https://github.com/typescript-eslint/typescript-eslint/issues/8804
//project: ["./tsconfig.json", "./tsconfig-back.json"],
project: "./tsconfig-back.json",
},
rules: {
"@typescript-eslint/no-unused-vars": [2, { varsIgnorePattern: "TempstreamJSX" }],
"no-unused-vars": [2, { varsIgnorePattern: "TempstreamJSX" }],
"no-unused-vars": 0,
"@typescript-eslint/require-await": 0,
/* "jsdoc/require-description": 2, */
"no-await-in-loop": 2,
"@typescript-eslint/consistent-type-assertions": [1, { assertionStyle: "never" }],
"no-console": [1, { allow: ["error"] }],
"@typescript-eslint/consistent-type-imports": [
2,
{ disallowTypeAnnotations: false },
],
},
ignorePatterns: ["dist/*", "public/dist/*", "coverage/*", "webhint/*"],
settings: { jsdoc: { mode: "typescript" } },
@ -42,8 +43,11 @@ module.exports = {
},
},
{
files: ["*.stimulus.ts", "src/front/*.ts"],
files: ["*.stimulus.ts", "src/front/*.ts", "src/front/**/*.ts"],
env: { browser: true },
parserOptions: {
project: "./tsconfig-front.json",
},
},
],
};

8
package-lock.json generated
View File

@ -21,7 +21,7 @@
"@types/leaflet": "^1.9.8",
"get-port": "^7.0.0",
"js-convert-case": "^4.2.0",
"koa-responsive-image-router": "^0.2.23",
"koa-responsive-image-router": "^0.2.24",
"locreq": "^3.0.0",
"multiple-scripts-tmux": "^1.0.4",
"nodemon": "^3.0.1",
@ -5592,9 +5592,9 @@
}
},
"node_modules/koa-responsive-image-router": {
"version": "0.2.23",
"resolved": "https://registry.npmjs.org/koa-responsive-image-router/-/koa-responsive-image-router-0.2.23.tgz",
"integrity": "sha512-Zf7tBKx6c4BMcCE9/ubk5c+zzHB3hvrVFafH3F75Arfu2VjAvFcuwfSjWOWbfgkD5Fu69og603sxTUeJ2Jfbvw==",
"version": "0.2.24",
"resolved": "https://registry.npmjs.org/koa-responsive-image-router/-/koa-responsive-image-router-0.2.24.tgz",
"integrity": "sha512-dHKBCu+hQ+v/60iyxy0qBJ4GlbF0h0RDj+qwiGSPxnexMDtGVidgOMp+pPAryeJ4A6vUJwzSm0DhExrqWFe3hw==",
"dependencies": {
"@koa/router": "^10.0.0",
"@sealcode/ts-predicates": "^0.5.3",

View File

@ -42,7 +42,7 @@
"@types/leaflet": "^1.9.8",
"get-port": "^7.0.0",
"js-convert-case": "^4.2.0",
"koa-responsive-image-router": "^0.2.23",
"koa-responsive-image-router": "^0.2.24",
"locreq": "^3.0.0",
"multiple-scripts-tmux": "^1.0.4",
"nodemon": "^3.0.1",

View File

@ -1,5 +1,6 @@
import _locreq from "locreq";
import { App, LoggerMailer, SMTPMailer, Context as SealiousContext } from "sealious";
import type { Context as SealiousContext } from "sealious";
import { App, LoggerMailer, SMTPMailer } from "sealious";
import type { LoggerLevel } from "sealious/@types/src/app/logger.js";
import { collections } from "./collections/collections.js";
import {

View File

@ -1,6 +1,6 @@
import axios from "axios";
import assert from "assert";
import TheApp from "../app.js";
import type TheApp from "../app.js";
import { withProdApp } from "../test_utils/with-prod-app.js";
import { LONG_TEST_TIMEOUT } from "../test_utils/webhint.js";

View File

@ -1,4 +1,5 @@
import { App, Collection, CollectionItem, Context, FieldTypes, Policies } from "sealious";
import type { App, CollectionItem, Context } from "sealious";
import { Collection, FieldTypes, Policies } from "sealious";
import assert from "assert";
import PasswordResetTemplate from "../email-templates/password-reset.js";
import TheApp from "../app.js";

View File

@ -1,4 +1,5 @@
import { App, Collection, FieldTypes, Policies, Policy } from "sealious";
import type { App, Policy } from "sealious";
import { Collection, FieldTypes, Policies } from "sealious";
import { Roles } from "../policy-types/roles.js";
export default class UserRoles extends Collection {

View File

@ -1,4 +1,5 @@
import { App, Collections, Context, FieldTypes, Policies } from "sealious";
import type { Context } from "sealious";
import { App, Collections, FieldTypes, Policies } from "sealious";
import assert from "assert";
import TheApp from "../app.js";
import ADMIN_CREDENTIALS from "../default-admin-credentials.js";

View File

@ -1,5 +1,5 @@
import { EmailTemplates, Errors } from "sealious";
import TheApp from "../app.js";
import type TheApp from "../app.js";
export default async function PasswordResetTemplate(
app: TheApp,

View File

@ -1,4 +1,5 @@
import { App, EmailTemplates } from "sealious";
import type { App } from "sealious";
import { EmailTemplates } from "sealious";
export default async function RegistrationIntentTemplate(
app: App,

View File

@ -1,6 +1,7 @@
import { FlatTemplatable, Templatable, tempstream } from "tempstream";
import { Readable } from "stream";
import { BaseContext } from "koa";
import type { FlatTemplatable, Templatable } from "tempstream";
import { tempstream } from "tempstream";
import type { Readable } from "stream";
import type { BaseContext } from "koa";
import { toKebabCase } from "js-convert-case";
import { DEFAULT_HTML_LANG } from "./config.js";
import { default_navbar } from "./routes/common/navbar.js";

View File

@ -1,12 +1,12 @@
import arrow from "./autoscrolling-images-arrow.svg";
import { FlatTemplatable, TempstreamJSX } from "tempstream";
import {
Component,
ComponentArguments,
import type { FlatTemplatable } from "tempstream";
import { TempstreamJSX } from "tempstream";
import type {
ExtractStructuredComponentArgumentsValues,
JDDContext,
} from "@sealcode/jdd";
import { Component, ComponentArguments } from "@sealcode/jdd";
import arrow from "./autoscrolling-images-arrow.svg";
const component_arguments = {
title: new ComponentArguments.ShortText(),
@ -35,7 +35,7 @@ export class AutoscrollingImages extends Component<typeof component_arguments> {
{ render_image }: JDDContext
): FlatTemplatable {
const imageNumberPerPage = parseInt(imagesPerPage);
let parsedImagesArray = [];
const parsedImagesArray = [];
for (let i = 0; i < images.length; i += imageNumberPerPage) {
parsedImagesArray.push(images.slice(i, i + imageNumberPerPage));
@ -149,7 +149,7 @@ export class AutoscrollingImages extends Component<typeof component_arguments> {
</div>
</div>
<div class="autoscrolling-images__dots-container">
{parsedImagesArray.map((pageIndex) => (
{parsedImagesArray.map((_, pageIndex) => (
<label
for={`${radioButtonIdPrefix}-autoscrolling-images__radio-${pageIndex}`}
class="autoscrolling-images__dots"

View File

@ -1,10 +1,10 @@
import { FlatTemplatable, TempstreamJSX } from "tempstream";
import {
Component,
ComponentArguments,
import type { FlatTemplatable } from "tempstream";
import { TempstreamJSX } from "tempstream";
import type {
ExtractStructuredComponentArgumentsValues,
JDDContext,
} from "@sealcode/jdd";
import { Component, ComponentArguments } from "@sealcode/jdd";
const component_arguments = {
title: new ComponentArguments.ShortText(),

View File

@ -1,10 +1,10 @@
import { FlatTemplatable, TempstreamJSX } from "tempstream";
import {
Component,
ComponentArguments,
import type { FlatTemplatable } from "tempstream";
import { TempstreamJSX } from "tempstream";
import type {
ExtractStructuredComponentArgumentsValues,
JDDContext,
} from "@sealcode/jdd";
import { Component, ComponentArguments } from "@sealcode/jdd";
const component_arguments = {
image_with_alt: new ComponentArguments.Structured({

View File

@ -1,9 +1,7 @@
import { FlatTemplatable, TempstreamJSX } from "tempstream";
import {
Component,
ComponentArguments,
ExtractStructuredComponentArgumentsValues,
} from "@sealcode/jdd";
import type { FlatTemplatable } from "tempstream";
import { TempstreamJSX } from "tempstream";
import type { ExtractStructuredComponentArgumentsValues } from "@sealcode/jdd";
import { Component, ComponentArguments } from "@sealcode/jdd";
const coordinates = new ComponentArguments.ShortText();
coordinates.setExampleValues([

View File

@ -1,11 +1,10 @@
import { TempstreamJSX } from "tempstream";
import {
Component,
ComponentArguments,
import type {
ExtractStructuredComponentArgumentsValues,
JDDContext,
} from "@sealcode/jdd";
import { Readable } from "stream";
import { Component, ComponentArguments } from "@sealcode/jdd";
import type { Readable } from "stream";
const component_arguments = {
title: new ComponentArguments.ShortText(),

View File

@ -1,11 +1,7 @@
import { FlatTemplatable, TempstreamJSX } from "tempstream";
import {
Component,
ComponentArguments,
ExtractStructuredComponentArgumentsValues,
isTableHeader,
JDDContext,
} from "@sealcode/jdd";
import type { FlatTemplatable } from "tempstream";
import { TempstreamJSX } from "tempstream";
import type { ExtractStructuredComponentArgumentsValues } from "@sealcode/jdd";
import { Component, ComponentArguments, isTableHeader } from "@sealcode/jdd";
const component_arguments = {
table: new ComponentArguments.Table(

View File

@ -1,4 +1,5 @@
import { Context, Policy, QueryTypes } from "sealious";
import type { Context } from "sealious";
import { Policy, QueryTypes } from "sealious";
export class Roles extends Policy {
static type_name = "roles";

View File

@ -1,6 +1,6 @@
import html from "../../html.js";
import { BaseContext } from "koa";
import { Readable } from "stream";
import type { BaseContext } from "koa";
import type { Readable } from "stream";
import { tempstream } from "tempstream";
export function MainView(ctx: BaseContext): Readable {

View File

@ -1,5 +1,5 @@
import { BaseContext } from "koa";
import { FlatTemplatable } from "tempstream";
import type { BaseContext } from "koa";
import type { FlatTemplatable } from "tempstream";
import { SignUpURL, SignInURL, TodoURL, LogoutURL } from "../urls.js";
export async function default_navbar(ctx: BaseContext): Promise<FlatTemplatable> {

View File

@ -1,7 +1,7 @@
import { BaseContext } from "koa";
import { CollectionItem } from "sealious";
import type { BaseContext } from "koa";
import type { CollectionItem } from "sealious";
import frame from "../../frame.js";
import { Tasks } from "../../collections/collections.js";
import type { Tasks } from "../../collections/collections.js";
export function Task(task: CollectionItem<typeof Tasks>) {
const title = task.get("title");

View File

@ -1,4 +1,4 @@
import { Enum } from "@sealcode/jdd";
import type { Enum } from "@sealcode/jdd";
import { TempstreamJSX } from "tempstream";
import { printArgPath } from "./print-arg-path.js";

View File

@ -1,9 +1,9 @@
import { Image } from "@sealcode/jdd";
import { StatefulPage } from "@sealcode/sealgen";
import type { Image } from "@sealcode/jdd";
import type { StatefulPage } from "@sealcode/sealgen";
import { TempstreamJSX } from "tempstream";
import { ComponentPreviewState } from "../components.sreact.js";
import type { ComponentPreviewState } from "../components.sreact.js";
import { jdd_context } from "../jdd-context.js";
import { ComponentPreviewActions } from "./component-preview-actions.js";
import type { ComponentPreviewActions } from "./component-preview-actions.js";
import { printArgPath } from "./print-arg-path.js";
export function ComponentInputImage<State extends ComponentPreviewState>({

View File

@ -1,7 +1,7 @@
import { ComponentArgument, List } from "@sealcode/jdd";
import { StatefulPage } from "@sealcode/sealgen";
import type { List } from "@sealcode/jdd";
import type { StatefulPage } from "@sealcode/sealgen";
import { TempstreamJSX } from "tempstream";
import { ComponentPreviewState } from "../components.sreact.js";
import type { ComponentPreviewState } from "../components.sreact.js";
import { jdd_context } from "../jdd-context.js";
import { ComponentInput } from "./component-input.js";
import type { ComponentPreviewActions } from "./component-preview-actions.js";

View File

@ -1,9 +1,9 @@
import { ComponentArgument, Structured } from "@sealcode/jdd";
import { StatefulPage } from "@sealcode/sealgen";
import type { ComponentArgument, Structured } from "@sealcode/jdd";
import type { StatefulPage } from "@sealcode/sealgen";
import { TempstreamJSX } from "tempstream";
import { ComponentPreviewState } from "../components.sreact.js";
import type { ComponentPreviewState } from "../components.sreact.js";
import { ComponentInput } from "./component-input.js";
import { ComponentPreviewActions } from "./component-preview-actions.js";
import type { ComponentPreviewActions } from "./component-preview-actions.js";
export function ComponentInputStructured<
T extends Structured<Record<string, ComponentArgument<unknown>>>

View File

@ -1,7 +1,8 @@
import { ComponentArgument, isTableHeader, List, Table, TableData } from "@sealcode/jdd";
import { StatefulPage } from "@sealcode/sealgen";
import type { Table, TableData } from "@sealcode/jdd";
import { isTableHeader } from "@sealcode/jdd";
import type { StatefulPage } from "@sealcode/sealgen";
import { TempstreamJSX } from "tempstream";
import { ComponentPreviewState } from "../components.sreact.js";
import type { ComponentPreviewState } from "../components.sreact.js";
import { jdd_context } from "../jdd-context.js";
import { ComponentInput } from "./component-input.js";
import type { ComponentPreviewActions } from "./component-preview-actions.js";

View File

@ -1,14 +1,17 @@
import { ComponentArguments, Enum, Image, List, Structured, Table, TableData } from "@sealcode/jdd";
import { ComponentArgument } from "@sealcode/jdd";
import { StatefulPage } from "@sealcode/sealgen";
import type { TableData } from "@sealcode/jdd";
import { ComponentArguments, Enum, Image, List, Structured, Table } from "@sealcode/jdd";
import type { ComponentArgument } from "@sealcode/jdd";
import type { StatefulPage } from "@sealcode/sealgen";
import { TempstreamJSX } from "tempstream";
import { ComponentPreviewState } from "../components.sreact.js";
import type { ComponentPreviewState } from "../components.sreact.js";
import { ComponentInputEnum } from "./component-input-enum.js";
import { ComponentInputImage } from "./component-input-image.js";
import { ComponentInputList } from "./component-input-list.js";
import { ComponentInputStructured } from "./component-input-structured.js";
import { ComponentInputTable } from "./component-input-table.js";
import { printArgPath } from "./print-arg-path.js";
import type { ComponentPreviewActions } from "./component-preview-actions.js";
import { is, predicates } from "@sealcode/ts-predicates";
export const actionName = "Components";
const absoluteUrlPattern = "http(s?)(://)((www.)?)(([^.]+).)?([a-zA-z0-9-_]+)";
@ -24,19 +27,19 @@ export function ComponentInput<State extends ComponentPreviewState, T>({
arg_path: string[];
arg: ComponentArgument<T>;
value: T;
page: StatefulPage<any, any>;
page: StatefulPage<ComponentPreviewState, typeof ComponentPreviewActions>;
}) {
if (value === undefined) {
value = arg.getEmptyValue();
}
if (arg instanceof List) {
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
return ComponentInputList({ state, arg_path, arg, value: value as T[], page });
}
const argType = arg.getTypeName();
const isUrlAbsolute =
arg instanceof ComponentArguments.URL &&
arg.urlType === "absolute";
arg instanceof ComponentArguments.URL && arg.urlType === "absolute";
const inputType = isUrlAbsolute ? "url" : "text";
if (arg instanceof Structured) {
@ -44,6 +47,7 @@ export function ComponentInput<State extends ComponentPreviewState, T>({
state,
arg_path,
arg,
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
value: value as Record<string, unknown>,
page,
});
@ -54,6 +58,7 @@ export function ComponentInput<State extends ComponentPreviewState, T>({
state,
arg_path,
arg,
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
value: value as string,
onchange: page.rerender(),
});
@ -64,6 +69,7 @@ export function ComponentInput<State extends ComponentPreviewState, T>({
state,
arg_path,
arg,
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
value: value as string,
page,
});
@ -74,6 +80,7 @@ export function ComponentInput<State extends ComponentPreviewState, T>({
state,
arg_path,
arg,
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
value: value as TableData<unknown, unknown>,
page,
});
@ -89,13 +96,13 @@ export function ComponentInput<State extends ComponentPreviewState, T>({
onblur={page.rerender()}
cols="40"
>
{value as string}
{is(value, predicates.string) ? value : ""}
</textarea>
) : (
<input
type={inputType}
name={`$.component_args${printArgPath(arg_path)}`}
value={value as string}
value={is(value, predicates.string) ? value : ""}
size="40"
pattern={isUrlAbsolute ? absoluteUrlPattern : undefined}
/>

View File

@ -1,4 +1,5 @@
import { isTableData, isTableRegularRow, TableData } from "@sealcode/jdd";
import type { TableData } from "@sealcode/jdd";
import { isTableData, isTableRegularRow } from "@sealcode/jdd";
import objectPath from "object-path";
import { registry } from "../../jdd-components/components.js";
import type { ComponentPreviewState } from "../components.sreact.js";
@ -22,6 +23,7 @@ export const ComponentPreviewActions = <const>{
component_args,
arg_path,
empty_value,
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
((objectPath.get(component_args, arg_path) as unknown[]) || []).length
);
return {
@ -88,6 +90,7 @@ export const ComponentPreviewActions = <const>{
component_args,
[...arg_path, "rows"],
row,
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
((objectPath.get(component_args, [...arg_path, "rows"]) as unknown[]) || [])
.length
);
@ -175,6 +178,7 @@ export const ComponentPreviewActions = <const>{
column_index: number
) => {
const component_args = state.component_args;
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
const data = objectPath.get(component_args, arg_path) as TableData<
unknown,
unknown
@ -199,6 +203,7 @@ export const ComponentPreviewActions = <const>{
row_index: number
) => {
const component_args = state.component_args;
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
const data = objectPath.get(component_args, arg_path) as TableData<
unknown,
unknown

View File

@ -1,8 +1,9 @@
import { render, renderEarlyAssets } from "@sealcode/jdd";
import { StatefulPage, to_base64 } from "@sealcode/sealgen";
import { hasShape, predicates } from "@sealcode/ts-predicates";
import { BaseContext } from "koa";
import { Templatable, tempstream, TempstreamJSX } from "tempstream";
import type { BaseContext } from "koa";
import type { Templatable } from "tempstream";
import { tempstream, TempstreamJSX } from "tempstream";
import html, { defaultHead } from "../html.js";
import { registry } from "../jdd-components/components.js";
import { ComponentInput } from "./component-preview/component-input.js";

View File

@ -1,4 +1,4 @@
import { Context } from "koa";
import type { Context } from "koa";
import { tempstream } from "tempstream";
import { Page } from "@sealcode/sealgen";
import html from "../html.js";

View File

@ -1,4 +1,4 @@
import Router from "@koa/router";
import type Router from "@koa/router";
import { Middlewares } from "sealious";
import { imageRouter, RESPONSIVE_IMAGES_URL_PATH } from "../image-router.js";
import { MainView } from "./common/main-view.js";

View File

@ -1,4 +1,5 @@
import { simpleJDDContext, JDDContext } from "@sealcode/jdd";
import type { JDDContext } from "@sealcode/jdd";
import { simpleJDDContext } from "@sealcode/jdd";
import { imageRouter } from "../image-router.js";
export const jdd_context: JDDContext = {

View File

@ -1,6 +1,6 @@
import { Context } from "koa";
import type { Context } from "koa";
import { Mountable } from "@sealcode/sealgen";
import Router from "@koa/router";
import type Router from "@koa/router";
export const actionName = "Logout";

View File

@ -1,8 +1,7 @@
import assert from "assert";
import { Browser, BrowserContext, Page } from "@playwright/test";
import type { Browser, BrowserContext, Page } from "@playwright/test";
import ADMIN_CREDENTIALS from "../default-admin-credentials.js";
import { getBrowser } from "../test_utils/browser-creator.js";
import { LONG_TEST_TIMEOUT, VERY_LONG_TEST_TIMEOUT } from "../test_utils/webhint.js";
import { LONG_TEST_TIMEOUT } from "../test_utils/webhint.js";
import { withProdApp } from "../test_utils/with-prod-app.js";
import { LogoutURL, SignInURL } from "./urls.js";

View File

@ -1,6 +1,6 @@
// DO NOT EDIT! This file is generated automaticaly with npm run generate-routes
import Router from "@koa/router";
import type Router from "@koa/router";
import { mount } from "@sealcode/sealgen";
import * as URLs from "./urls.js";

View File

@ -1,6 +1,7 @@
import { Context } from "koa";
import type { Context } from "koa";
import { Form, Fields, Controls, fieldsToShape } from "@sealcode/sealgen";
import { FlatTemplatable, tempstream } from "tempstream";
import type { FlatTemplatable } from "tempstream";
import { tempstream } from "tempstream";
import { Users } from "../collections/collections.js";
import html from "../html.js";
import type {

View File

@ -1,13 +1,6 @@
import { Context } from "koa";
import {
Form,
FormData,
FormDataValue,
Fields,
Controls,
FormReaction,
fieldsToShape,
} from "@sealcode/sealgen";
import type { Context } from "koa";
import type { FormData, FormDataValue, FormReaction } from "@sealcode/sealgen";
import { Form, Fields, Controls, fieldsToShape } from "@sealcode/sealgen";
import { Users } from "../collections/collections.js";
import html from "../html.js";

View File

@ -1,4 +1,4 @@
import { Browser, BrowserContext, Page } from "@playwright/test";
import type { Browser, BrowserContext, Page } from "@playwright/test";
import ADMIN_CREDENTIALS from "../default-admin-credentials.js";
import { getBrowser } from "../test_utils/browser-creator.js";
import { VERY_LONG_TEST_TIMEOUT, webhintURL } from "../test_utils/webhint.js";

View File

@ -1,13 +1,7 @@
import { tempstream } from "tempstream";
import { Context } from "koa";
import {
Form,
FormData,
FormDataValue,
Fields,
Controls,
fieldsToShape,
} from "@sealcode/sealgen";
import type { Context } from "koa";
import type { FormData, FormDataValue } from "@sealcode/sealgen";
import { Form, Fields, Controls, fieldsToShape } from "@sealcode/sealgen";
import { Tasks } from "../collections/collections.js";
import html from "../html.js";
import { TaskList } from "./common/tasks-view.js";

View File

@ -1,5 +1,5 @@
import assert from "assert";
import { Browser, BrowserContext, Page } from "@playwright/test";
import type { Browser, BrowserContext, Page } from "@playwright/test";
import ADMIN_CREDENTIALS from "../default-admin-credentials.js";
import { getBrowser } from "../test_utils/browser-creator.js";
import { LONG_TEST_TIMEOUT, VERY_LONG_TEST_TIMEOUT } from "../test_utils/webhint.js";

View File

@ -1,4 +1,5 @@
import { Browser, BrowserContext, firefox, Page } from "@playwright/test";
import type { Browser, BrowserContext, Page } from "@playwright/test";
import { firefox } from "@playwright/test";
let browser: Browser;

View File

@ -1,6 +1,6 @@
import { CollectionItem, TestUtils } from "sealious";
import TheApp from "../app.js";
import Users from "../collections/users.js";
import type { CollectionItem, TestUtils } from "sealious";
import type TheApp from "../app.js";
import type Users from "../collections/users.js";
type Unpromisify<T> = T extends Promise<infer R> ? R : T;

View File

@ -1,4 +1,4 @@
import { BaseContext } from "koa";
import type { BaseContext } from "koa";
import qs from "qs";
import { dirname } from "node:path";