Make knip happier (#32721)

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2026-03-05 21:42:08 +00:00
committed by GitHub
parent b2674e6fa4
commit 32037b0135
20 changed files with 168 additions and 198 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
{
"*": "prettier --write",
"*": "prettier --write --ignore-unknown",
"src/**/*.(ts|tsx)": ["eslint --fix"],
"scripts/**/*.(ts|tsx)": ["eslint --fix"],
"module_system/**/*.(ts|tsx)": ["eslint --fix"],
+3
View File
@@ -17,6 +17,9 @@ const config: Config = {
// This is needed to be able to load dual CJS/ESM WASM packages e.g. rust crypto & matrix-wywiwyg
customExportConditions: ["browser", "node"],
},
transform: {
"\\.[jt]sx?$": "babel-jest",
},
testMatch: ["<rootDir>/test/**/*-test.[tj]s?(x)"],
globalSetup: "<rootDir>/test/globalSetup.ts",
setupFiles: ["jest-canvas-mock", "web-streams-polyfill/polyfill"],
+1 -1
View File
@@ -129,7 +129,6 @@
"@babel/preset-env": "^7.12.11",
"@babel/preset-react": "^7.12.10",
"@babel/preset-typescript": "^7.12.7",
"@babel/runtime": "^7.12.5",
"@casualbot/jest-sonar-reporter": "2.5.0",
"@element-hq/element-call-embedded": "0.16.3",
"@element-hq/element-web-playwright-common": "catalog:",
@@ -210,6 +209,7 @@
"matrix-web-i18n": "catalog:",
"mini-css-extract-plugin": "2.10.0",
"modernizr": "^3.12.0",
"playwright-core": "catalog:",
"postcss": "8.5.6",
"postcss-easings": "4.0.0",
"postcss-hexrgba": "2.1.0",
+3 -3
View File
@@ -34,9 +34,9 @@
"executor": "nx:run-commands",
"options": {
"commands": [
"tsc --noEmit --project ./tsconfig.module_system.json",
"tsc --noEmit",
"tsc --noEmit -p playwright"
"pnpm tsc --noEmit --project ./tsconfig.module_system.json",
"pnpm tsc --noEmit",
"pnpm tsc --noEmit -p playwright"
],
"parallel": false,
"cwd": "apps/web"
-9
View File
@@ -1,9 +0,0 @@
/*
* Copyright 2025 New Vector Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
* Please see LICENSE files in the repository root for full details.
*/
@import url("@vector-im/compound-design-tokens/assets/web/css/compound-design-tokens.css") layer(compound);
@import url("@vector-im/compound-web/dist/style.css");
@@ -15,6 +15,7 @@ import { ErrorSolidIcon, InfoIcon } from "@vector-im/compound-design-tokens/asse
import { _t } from "../../../languageHandler";
export enum InfoTooltipKind {
/** @knipignore */
Info = "info",
Warning = "warning",
}
+4 -1
View File
@@ -10,7 +10,10 @@ import { useEffect, useRef, useState } from "react";
type Handler = () => void;
// Hook to simplify timeouts in functional components
/**
* Hook to simplify timeouts in functional components
* @knipignore
*/
export const useTimeout = (handler: Handler, timeoutMs: number): void => {
// Create a ref that stores handler
const savedHandler = useRef<Handler>(undefined);
+3 -4
View File
@@ -33,6 +33,9 @@ import { SnakedObject } from "../../utils/SnakedObject";
import { ElementWidgetCapabilities } from "../../stores/widgets/ElementWidgetCapabilities";
import { getVectorConfig } from "../getconfig";
// We have to trick webpack into loading our CSS for us.
import "./index.pcss";
interface Config extends _Config {
// Jitsi's types are missing these fields
prejoinConfig?: {
@@ -61,10 +64,6 @@ interface ExternalAPIOptions extends _ExternalAPIOptions {
lang?: string;
}
// We have to trick webpack into loading our CSS for us.
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./index.pcss");
const JITSI_OPENIDTOKEN_JWT_AUTH = "openidtoken-jwt";
// Dev note: we use raw JS without many dependencies to reduce bundle size.